// Path: app/src/main/java/com/liuguangqiang/idaily/entity/BaseEntity.java
// public class BaseEntity implements MultiItemEntity {
// 
//     @Override
//     public int getItemType() {
//         return 0;
//     }
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/entity/StorySection.java
// public class StorySection extends BaseEntity {
// 
//     public int datetime;
// 
//     public StorySection(int datetime) {
//         this.datetime = datetime;
//     }
// 
//     @Override
//     public int getItemType() {
//         return StoriesAdapter.ITEM_SECTION;
//     }
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/adapter/ItemProvider/SectionItemProvider.java
// public class SectionItemProvider<T> extends BaseItemProvider<StorySection> {
// 
//     @Override
//     public int getItemViewType() {
//         return StoriesAdapter.ITEM_SECTION;
//     }
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.item_story_header;
//     }
// 
//     @Override
//     public void onViewHolderCreated(BaseViewHolder viewHolder, int viewType) {
//         DataBindingUtil.bind(viewHolder.itemView);
//     }
// 
//     @Override
//     public void convert(@NotNull BaseViewHolder helper, @NotNull StorySection data) {
//         ItemStoryHeaderBinding binding =DataBindingUtil.getBinding(helper.itemView);
//         if (binding != null) {
//             binding.setSection(data);
//             binding.executePendingBindings();
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/adapter/ItemProvider/StoryItemProvider.java
// public class StoryItemProvider<T> extends BaseItemProvider<Story> {
// 
//     @Override
//     public int getItemViewType() {
//         return StoriesAdapter.ITEM_STORY;
//     }
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.item_story;
//     }
// 
//     @Override
//     public void onViewHolderCreated(BaseViewHolder viewHolder, int viewType) {
//         DataBindingUtil.bind(viewHolder.itemView);
//     }
// 
//     @Override
//     public void convert(@NotNull BaseViewHolder helper, @NotNull Story data) {
//         Timber.d("StoryItemProvider convert");
//         ItemStoryBinding binding = DataBindingUtil.getBinding(helper.itemView);
//         if (binding != null) {
//             Timber.d("StoryItemProvider binding");
//             binding.setStory(data);
//             binding.executePendingBindings();
//         }
//     }
// 
// }


import com.chad.library.adapter.base.BaseProviderMultiAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.liuguangqiang.idaily.entity.BaseEntity;
import com.liuguangqiang.idaily.entity.StorySection;
import com.liuguangqiang.idaily.adapter.ItemProvider.SectionItemProvider;
import com.liuguangqiang.idaily.adapter.ItemProvider.StoryItemProvider;
import org.jetbrains.annotations.Nullable;
import java.util.List;
package com.liuguangqiang.idaily.adapter;




/**
 * 首页列表adapter
 *
 * Created by Eric at 2021/7/31
 */
public class StoriesAdapter extends BaseProviderMultiAdapter<BaseEntity> implements LoadMoreModule {

    public static final int ITEM_STORY = 0;

    public static final int ITEM_SECTION = 1;

    public StoriesAdapter(@Nullable List<BaseEntity> data) {
        super(data);
        addItemProvider(new StoryItemProvider());
// Path: app/src/main/java/com/liuguangqiang/idaily/entity/BaseEntity.java
// public class BaseEntity implements MultiItemEntity {
// 
//     @Override
//     public int getItemType() {
//         return 0;
//     }
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/entity/StorySection.java
// public class StorySection extends BaseEntity {
// 
//     public int datetime;
// 
//     public StorySection(int datetime) {
//         this.datetime = datetime;
//     }
// 
//     @Override
//     public int getItemType() {
//         return StoriesAdapter.ITEM_SECTION;
//     }
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/adapter/ItemProvider/SectionItemProvider.java
// public class SectionItemProvider<T> extends BaseItemProvider<StorySection> {
// 
//     @Override
//     public int getItemViewType() {
//         return StoriesAdapter.ITEM_SECTION;
//     }
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.item_story_header;
//     }
// 
//     @Override
//     public void onViewHolderCreated(BaseViewHolder viewHolder, int viewType) {
//         DataBindingUtil.bind(viewHolder.itemView);
//     }
// 
//     @Override
//     public void convert(@NotNull BaseViewHolder helper, @NotNull StorySection data) {
//         ItemStoryHeaderBinding binding =DataBindingUtil.getBinding(helper.itemView);
//         if (binding != null) {
//             binding.setSection(data);
//             binding.executePendingBindings();
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/liuguangqiang/idaily/adapter/ItemProvider/StoryItemProvider.java
// public class StoryItemProvider<T> extends BaseItemProvider<Story> {
// 
//     @Override
//     public int getItemViewType() {
//         return StoriesAdapter.ITEM_STORY;
//     }
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.item_story;
//     }
// 
//     @Override
//     public void onViewHolderCreated(BaseViewHolder viewHolder, int viewType) {
//         DataBindingUtil.bind(viewHolder.itemView);
//     }
// 
//     @Override
//     public void convert(@NotNull BaseViewHolder helper, @NotNull Story data) {
//         Timber.d("StoryItemProvider convert");
//         ItemStoryBinding binding = DataBindingUtil.getBinding(helper.itemView);
//         if (binding != null) {
//             Timber.d("StoryItemProvider binding");
//             binding.setStory(data);
//             binding.executePendingBindings();
//         }
//     }
// 
// }


// Path: app/src/main/java/com/liuguangqiang/idaily/adapter/StoriesAdapter.java
import com.chad.library.adapter.base.BaseProviderMultiAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.liuguangqiang.idaily.entity.BaseEntity;
import com.liuguangqiang.idaily.entity.StorySection;
import com.liuguangqiang.idaily.adapter.ItemProvider.SectionItemProvider;
import com.liuguangqiang.idaily.adapter.ItemProvider.StoryItemProvider;
import org.jetbrains.annotations.Nullable;
import java.util.List;

package com.liuguangqiang.idaily.adapter;




/**
 * 首页列表adapter
 *
 * Created by Eric at 2021/7/31
 */
public class StoriesAdapter extends BaseProviderMultiAdapter<BaseEntity> implements LoadMoreModule {

    public static final int ITEM_STORY = 0;

    public static final int ITEM_SECTION = 1;

    public StoriesAdapter(@Nullable List<BaseEntity> data) {
        super(data);
        addItemProvider(new StoryItemProvider());
        addItemProvider(new SectionItemProvider());