From 34989892030c17ff93a873435bb0dc74ef388960 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 21 Jul 2021 13:10:08 +0800 Subject: Remove some view types in PostRecyclerViewAdapter. --- .../adapters/PostRecyclerViewAdapter.java | 82 +++++++--------------- 1 file changed, 24 insertions(+), 58 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 7c08ad59..0f66c665 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -106,19 +106,15 @@ import retrofit2.Retrofit; public class PostRecyclerViewAdapter extends PagedListAdapter implements CacheManager { private static final int VIEW_TYPE_POST_CARD_VIDEO_AUTOPLAY_TYPE = 1; - private static final int VIEW_TYPE_POST_CARD_VIDEO_AND_GIF_PREVIEW_TYPE = 2; - private static final int VIEW_TYPE_POST_CARD_IMAGE_AND_GIF_AUTOPLAY_TYPE = 3; - private static final int VIEW_TYPE_POST_CARD_LINK_TYPE = 4; - private static final int VIEW_TYPE_POST_CARD_NO_PREVIEW_LINK_TYPE = 5; - private static final int VIEW_TYPE_POST_CARD_TEXT_TYPE = 6; - private static final int VIEW_TYPE_POST_CARD_GALLERY_TYPE = 7; - private static final int VIEW_TYPE_POST_COMPACT = 8; - private static final int VIEW_TYPE_POST_GALLERY = 9; - private static final int VIEW_TYPE_POST_CARD_2_VIDEO_AUTOPLAY_TYPE = 10; - private static final int VIEW_TYPE_POST_CARD_2_WITH_PREVIEW = 11; - private static final int VIEW_TYPE_POST_CARD_2_TEXT_TYPE = 12; - private static final int VIEW_TYPE_ERROR = 13; - private static final int VIEW_TYPE_LOADING = 14; + private static final int VIEW_TYPE_POST_CARD_WITH_PREVIEW_TYPE = 2; + private static final int VIEW_TYPE_POST_CARD_TEXT_TYPE = 3; + private static final int VIEW_TYPE_POST_COMPACT = 4; + private static final int VIEW_TYPE_POST_GALLERY = 5; + private static final int VIEW_TYPE_POST_CARD_2_VIDEO_AUTOPLAY_TYPE = 6; + private static final int VIEW_TYPE_POST_CARD_2_WITH_PREVIEW_TYPE = 7; + private static final int VIEW_TYPE_POST_CARD_2_TEXT_TYPE = 8; + private static final int VIEW_TYPE_ERROR = 9; + private static final int VIEW_TYPE_LOADING = 10; private static final DiffUtil.ItemCallback DIFF_CALLBACK = new DiffUtil.ItemCallback() { @Override @@ -368,43 +364,25 @@ public class PostRecyclerViewAdapter extends PagedListAdapter