diff options
Diffstat (limited to 'app/src/main/java')
8 files changed, 124 insertions, 82 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index df789268..f9268870 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -211,7 +211,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy private int mArchivedTintColor; private int mLockedTintColor; private int mCrosspostTintColor; - private int mNoPreviewLinkBackgroundColor; + private int mNoPreviewPostTypeBackgroundColor; + private int mNoPreviewPostTypeIconTint; private int mUpvotedColor; private int mDownvotedColor; private int mCommentVerticalBarColor1; @@ -518,7 +519,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy mArchivedTintColor = customThemeWrapper.getArchivedIconTint(); mLockedTintColor = customThemeWrapper.getLockedIconTint(); mCrosspostTintColor = customThemeWrapper.getCrosspostIconTint(); - mNoPreviewLinkBackgroundColor = customThemeWrapper.getNoPreviewLinkBackgroundColor(); + mNoPreviewPostTypeBackgroundColor = customThemeWrapper.getNoPreviewPostTypeBackgroundColor(); + mNoPreviewPostTypeIconTint = customThemeWrapper.getNoPreviewPostTypeIconTint(); mFlairBackgroundColor = customThemeWrapper.getFlairBackgroundColor(); mFlairTextColor = customThemeWrapper.getFlairTextColor(); mSubredditColor = customThemeWrapper.getSubreddit(); @@ -647,28 +649,28 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy case VIEW_TYPE_POST_DETAIL_VIDEO_AUTOPLAY: if (mDataSavingMode) { if (mDisableImagePreview) { - return new PostDetailNoPreviewLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview_link, parent, false)); + return new PostDetailNoPreviewViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview, parent, false)); } return new PostDetailVideoAndGifPreviewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_video_and_gif_preview, parent, false)); } return new PostDetailVideoAutoplayViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_video_autoplay, parent, false)); case VIEW_TYPE_POST_DETAIL_VIDEO_AND_GIF_PREVIEW: if (mDataSavingMode && mDisableImagePreview) { - return new PostDetailNoPreviewLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview_link, parent, false)); + return new PostDetailNoPreviewViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview, parent, false)); } return new PostDetailVideoAndGifPreviewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_video_and_gif_preview, parent, false)); case VIEW_TYPE_POST_DETAIL_IMAGE_AND_GIF_AUTOPLAY: if (mDataSavingMode && mDisableImagePreview) { - return new PostDetailNoPreviewLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview_link, parent, false)); + return new PostDetailNoPreviewViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview, parent, false)); } return new PostDetailImageAndGifAutoplayViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_image_and_gif_autoplay, parent, false)); case VIEW_TYPE_POST_DETAIL_LINK: if (mDataSavingMode && mDisableImagePreview) { - return new PostDetailNoPreviewLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview_link, parent, false)); + return new PostDetailNoPreviewViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview, parent, false)); } return new PostDetailLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_link, parent, false)); case VIEW_TYPE_POST_DETAIL_NO_PREVIEW_LINK: - return new PostDetailNoPreviewLinkViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview_link, parent, false)); + return new PostDetailNoPreviewViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_no_preview, parent, false)); case VIEW_TYPE_POST_DETAIL_GALLERY: return new PostDetailGalleryViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_detail_gallery, parent, false)); case VIEW_TYPE_POST_DETAIL_TEXT_TYPE: @@ -929,39 +931,39 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy loadImage((PostDetailLinkViewHolder) holder, preview); } - } else if (holder instanceof PostDetailNoPreviewLinkViewHolder) { + } else if (holder instanceof PostDetailNoPreviewViewHolder) { if (mPost.getPostType() == Post.LINK_TYPE || mPost.getPostType() == Post.NO_PREVIEW_LINK_TYPE) { String noPreviewLinkDomain = Uri.parse(mPost.getUrl()).getHost(); - ((PostDetailNoPreviewLinkViewHolder) holder).mLinkTextView.setVisibility(View.VISIBLE); - ((PostDetailNoPreviewLinkViewHolder) holder).mLinkTextView.setText(noPreviewLinkDomain); + ((PostDetailNoPreviewViewHolder) holder).mLinkTextView.setVisibility(View.VISIBLE); + ((PostDetailNoPreviewViewHolder) holder).mLinkTextView.setText(noPreviewLinkDomain); } else { - ((PostDetailNoPreviewLinkViewHolder) holder).mLinkTextView.setVisibility(View.GONE); + ((PostDetailNoPreviewViewHolder) holder).mLinkTextView.setVisibility(View.GONE); switch (mPost.getPostType()) { case Post.VIDEO_TYPE: - ((PostDetailNoPreviewLinkViewHolder) holder).mTypeTextView.setText(R.string.video); - ((PostDetailNoPreviewLinkViewHolder) holder).mNoPreviewLinkImageView.setImageResource(R.drawable.ic_outline_video_24dp); + ((PostDetailNoPreviewViewHolder) holder).mTypeTextView.setText(R.string.video); + ((PostDetailNoPreviewViewHolder) holder).mNoPreviewPostTypeImageView.setImageResource(R.drawable.ic_outline_video_24dp); break; case Post.IMAGE_TYPE: - ((PostDetailNoPreviewLinkViewHolder) holder).mTypeTextView.setText(R.string.image); - ((PostDetailNoPreviewLinkViewHolder) holder).mNoPreviewLinkImageView.setImageResource(R.drawable.ic_image_24dp); + ((PostDetailNoPreviewViewHolder) holder).mTypeTextView.setText(R.string.image); + ((PostDetailNoPreviewViewHolder) holder).mNoPreviewPostTypeImageView.setImageResource(R.drawable.ic_image_24dp); break; case Post.GIF_TYPE: - ((PostDetailNoPreviewLinkViewHolder) holder).mTypeTextView.setText(R.string.gif); - ((PostDetailNoPreviewLinkViewHolder) holder).mNoPreviewLinkImageView.setImageResource(R.drawable.ic_image_24dp); + ((PostDetailNoPreviewViewHolder) holder).mTypeTextView.setText(R.string.gif); + ((PostDetailNoPreviewViewHolder) holder).mNoPreviewPostTypeImageView.setImageResource(R.drawable.ic_image_24dp); break; case Post.LINK_TYPE: case Post.NO_PREVIEW_LINK_TYPE: - ((PostDetailNoPreviewLinkViewHolder) holder).mTypeTextView.setText(R.string.link); + ((PostDetailNoPreviewViewHolder) holder).mTypeTextView.setText(R.string.link); break; case Post.GALLERY_TYPE: - ((PostDetailNoPreviewLinkViewHolder) holder).mTypeTextView.setText(R.string.gallery); - ((PostDetailNoPreviewLinkViewHolder) holder).mNoPreviewLinkImageView.setImageResource(R.drawable.ic_gallery_24dp); + ((PostDetailNoPreviewViewHolder) holder).mTypeTextView.setText(R.string.gallery); + ((PostDetailNoPreviewViewHolder) holder).mNoPreviewPostTypeImageView.setImageResource(R.drawable.ic_gallery_24dp); break; } } if (mPost.getSelfText() != null && !mPost.getSelfText().equals("")) { - ((PostDetailNoPreviewLinkViewHolder) holder).mContentMarkdownView.setVisibility(View.VISIBLE); + ((PostDetailNoPreviewViewHolder) holder).mContentMarkdownView.setVisibility(View.VISIBLE); LinearLayoutManager linearLayoutManager = new MarkwonLinearLayoutManager(mActivity, new MarkwonLinearLayoutManager.HorizontalScrollViewScrolledListener() { @Override public void onScrolledLeft() { @@ -973,8 +975,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy ((ViewPostDetailActivity) mActivity).unlockSwipeRightToGoBack(); } }); - ((PostDetailNoPreviewLinkViewHolder) holder).mContentMarkdownView.setLayoutManager(linearLayoutManager); - ((PostDetailNoPreviewLinkViewHolder) holder).mContentMarkdownView.setAdapter(mMarkwonAdapter); + ((PostDetailNoPreviewViewHolder) holder).mContentMarkdownView.setLayoutManager(linearLayoutManager); + ((PostDetailNoPreviewViewHolder) holder).mContentMarkdownView.setAdapter(mMarkwonAdapter); mMarkwonAdapter.setMarkdown(mPostDetailMarkwon, mPost.getSelfText()); mMarkwonAdapter.notifyDataSetChanged(); } @@ -987,7 +989,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy loadImage((PostDetailGalleryViewHolder) holder, preview); } else { - ((PostDetailGalleryViewHolder) holder).mNoPreviewLinkImageView.setVisibility(View.VISIBLE); + ((PostDetailGalleryViewHolder) holder).mNoPreviewPostTypeImageView.setVisibility(View.VISIBLE); } } else if (holder instanceof PostDetailTextViewHolder) { if (mPost.getSelfText() != null && !mPost.getSelfText().equals("")) { @@ -2994,7 +2996,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy } } - class PostDetailNoPreviewLinkViewHolder extends PostDetailBaseViewHolder { + class PostDetailNoPreviewViewHolder extends PostDetailBaseViewHolder { @BindView(R.id.icon_gif_image_view_item_post_detail_no_preview_link) AspectRatioGifImageView mIconGifImageView; @BindView(R.id.subreddit_text_view_item_post_detail_no_preview_link) @@ -3027,8 +3029,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy TextView mAwardsTextView; @BindView(R.id.link_text_view_item_post_detail_no_preview_link) TextView mLinkTextView; - @BindView(R.id.image_view_no_preview_link_item_post_detail_no_preview_link) - ImageView mNoPreviewLinkImageView; + @BindView(R.id.image_view_no_preview_post_type_item_post_detail_no_preview_link) + ImageView mNoPreviewPostTypeImageView; @BindView(R.id.bottom_constraint_layout_item_post_detail_no_preview_link) ConstraintLayout mBottomConstraintLayout; @BindView(R.id.plus_button_item_post_detail_no_preview_link) @@ -3044,7 +3046,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy @BindView(R.id.share_button_item_post_detail_no_preview_link) ImageView mShareButton; - PostDetailNoPreviewLinkViewHolder(@NonNull View itemView) { + PostDetailNoPreviewViewHolder(@NonNull View itemView) { super(itemView); ButterKnife.bind(this, itemView); setBaseView(mIconGifImageView, @@ -3070,9 +3072,10 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy mShareButton); mLinkTextView.setTextColor(mSecondaryTextColor); - mNoPreviewLinkImageView.setBackgroundColor(mNoPreviewLinkBackgroundColor); + mNoPreviewPostTypeImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); + mNoPreviewPostTypeImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); - mNoPreviewLinkImageView.setOnClickListener(view -> { + mNoPreviewPostTypeImageView.setOnClickListener(view -> { if (mPost != null) { if (mPost.getPostType() == Post.VIDEO_TYPE) { Intent intent = new Intent(mActivity, ViewVideoActivity.class); @@ -3168,7 +3171,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy @BindView(R.id.image_view_item_post_detail_gallery) AspectRatioGifImageView mImageView; @BindView(R.id.image_view_no_preview_link_item_post_detail_gallery) - ImageView mNoPreviewLinkImageView; + ImageView mNoPreviewPostTypeImageView; @BindView(R.id.bottom_constraint_layout_item_post_detail_gallery) ConstraintLayout mBottomConstraintLayout; @BindView(R.id.plus_button_item_post_detail_gallery) @@ -3211,7 +3214,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy mLoadImageProgressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); mLoadImageErrorTextView.setTextColor(mPrimaryTextColor); - mNoPreviewLinkImageView.setBackgroundColor(mNoPreviewLinkBackgroundColor); + mNoPreviewPostTypeImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); + mNoPreviewPostTypeImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); mImageView.setOnClickListener(view -> { Intent intent = new Intent(mActivity, ViewRedditGalleryActivity.class); @@ -3220,7 +3224,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy mActivity.startActivity(intent); }); - mNoPreviewLinkImageView.setOnClickListener(view -> { + mNoPreviewPostTypeImageView.setOnClickListener(view -> { mImageView.performClick(); }); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index b2ebe254..0f953683 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -161,7 +161,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView private int mArchivedIconTint; private int mLockedIconTint; private int mCrosspostIconTint; - private int mNoPreviewLinkBackgroundColor; + private int mNoPreviewPostTypeBackgroundColor; + private int mNoPreviewPostTypeIconTint; private int mUpvotedColor; private int mDownvotedColor; private int mVoteAndReplyUnavailableVoteButtonColor; @@ -275,7 +276,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView mArchivedIconTint = customThemeWrapper.getArchivedIconTint(); mLockedIconTint = customThemeWrapper.getLockedIconTint(); mCrosspostIconTint = customThemeWrapper.getCrosspostIconTint(); - mNoPreviewLinkBackgroundColor = customThemeWrapper.getNoPreviewLinkBackgroundColor(); + mNoPreviewPostTypeBackgroundColor = customThemeWrapper.getNoPreviewPostTypeBackgroundColor(); + mNoPreviewPostTypeIconTint = customThemeWrapper.getNoPreviewPostTypeIconTint(); mUpvotedColor = customThemeWrapper.getUpvoted(); mDownvotedColor = customThemeWrapper.getDownvoted(); mVoteAndReplyUnavailableVoteButtonColor = customThemeWrapper.getVoteAndReplyUnavailableButtonColor(); @@ -2140,7 +2142,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView shareButton); linkTextView.setTextColor(mSecondaryTextColor); - noPreviewLinkImageView.setBackgroundColor(mNoPreviewLinkBackgroundColor); + noPreviewLinkImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); + noPreviewLinkImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); progressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); errorTextView.setTextColor(mPrimaryTextColor); @@ -2415,7 +2418,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView crosspostImageView.setColorFilter(mCrosspostIconTint, PorterDuff.Mode.SRC_IN); linkTextView.setTextColor(mSecondaryTextColor); progressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); - noPreviewLinkImageView.setBackgroundColor(mNoPreviewLinkBackgroundColor); + noPreviewLinkImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); + noPreviewLinkImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); upvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mPostIconAndInfoColor); downvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomTheme.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomTheme.java index 45c12d6f..78288933 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomTheme.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomTheme.java @@ -109,6 +109,8 @@ public class CustomTheme { public int crosspostIconTint; @ColumnInfo(name = "stickied_post_icon_tint") public int stickiedPostIconTint; + @ColumnInfo(name = "no_preview_post_type_icon_tint") + public int noPreviewPostTypeIconTint; @ColumnInfo(name = "subscribed") public int subscribed; @ColumnInfo(name = "unsubscribed") @@ -130,7 +132,7 @@ public class CustomTheme { @ColumnInfo(name = "divider_color") public int dividerColor; @ColumnInfo(name = "no_preview_link_background_color") - public int noPreviewLinkBackgroundColor; + public int noPreviewPostTypeBackgroundColor; @ColumnInfo(name = "vote_and_reply_unavailable_button_color") public int voteAndReplyUnavailableButtonColor; @ColumnInfo(name = "comment_vertical_bar_color_1") @@ -248,29 +250,30 @@ public class CustomTheme { customTheme.lockedIconTint = customThemeSettingsItems.get(53).colorValue; customTheme.crosspostIconTint = customThemeSettingsItems.get(54).colorValue; customTheme.stickiedPostIconTint = customThemeSettingsItems.get(55).colorValue; - customTheme.subscribed = customThemeSettingsItems.get(56).colorValue; - customTheme.unsubscribed = customThemeSettingsItems.get(57).colorValue; - customTheme.username = customThemeSettingsItems.get(58).colorValue; - customTheme.subreddit = customThemeSettingsItems.get(59).colorValue; - customTheme.authorFlairTextColor = customThemeSettingsItems.get(60).colorValue; - customTheme.submitter = customThemeSettingsItems.get(61).colorValue; - customTheme.moderator = customThemeSettingsItems.get(62).colorValue; - customTheme.singleCommentThreadBackgroundColor = customThemeSettingsItems.get(63).colorValue; - customTheme.unreadMessageBackgroundColor = customThemeSettingsItems.get(64).colorValue; - customTheme.dividerColor = customThemeSettingsItems.get(65).colorValue; - customTheme.noPreviewLinkBackgroundColor = customThemeSettingsItems.get(66).colorValue; - customTheme.voteAndReplyUnavailableButtonColor = customThemeSettingsItems.get(67).colorValue; - customTheme.commentVerticalBarColor1 = customThemeSettingsItems.get(68).colorValue; - customTheme.commentVerticalBarColor2 = customThemeSettingsItems.get(69).colorValue; - customTheme.commentVerticalBarColor3 = customThemeSettingsItems.get(70).colorValue; - customTheme.commentVerticalBarColor4 = customThemeSettingsItems.get(71).colorValue; - customTheme.commentVerticalBarColor5 = customThemeSettingsItems.get(72).colorValue; - customTheme.commentVerticalBarColor6 = customThemeSettingsItems.get(73).colorValue; - customTheme.commentVerticalBarColor7 = customThemeSettingsItems.get(74).colorValue; - customTheme.navBarColor = customThemeSettingsItems.get(75).colorValue; - customTheme.isLightStatusBar = customThemeSettingsItems.get(76).isEnabled; - customTheme.isLightNavBar = customThemeSettingsItems.get(77).isEnabled; - customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = customThemeSettingsItems.get(78).isEnabled; + customTheme.noPreviewPostTypeIconTint = customThemeSettingsItems.get(56).colorValue; + customTheme.subscribed = customThemeSettingsItems.get(57).colorValue; + customTheme.unsubscribed = customThemeSettingsItems.get(58).colorValue; + customTheme.username = customThemeSettingsItems.get(59).colorValue; + customTheme.subreddit = customThemeSettingsItems.get(60).colorValue; + customTheme.authorFlairTextColor = customThemeSettingsItems.get(61).colorValue; + customTheme.submitter = customThemeSettingsItems.get(62).colorValue; + customTheme.moderator = customThemeSettingsItems.get(63).colorValue; + customTheme.singleCommentThreadBackgroundColor = customThemeSettingsItems.get(64).colorValue; + customTheme.unreadMessageBackgroundColor = customThemeSettingsItems.get(65).colorValue; + customTheme.dividerColor = customThemeSettingsItems.get(66).colorValue; + customTheme.noPreviewPostTypeBackgroundColor = customThemeSettingsItems.get(67).colorValue; + customTheme.voteAndReplyUnavailableButtonColor = customThemeSettingsItems.get(68).colorValue; + customTheme.commentVerticalBarColor1 = customThemeSettingsItems.get(69).colorValue; + customTheme.commentVerticalBarColor2 = customThemeSettingsItems.get(70).colorValue; + customTheme.commentVerticalBarColor3 = customThemeSettingsItems.get(71).colorValue; + customTheme.commentVerticalBarColor4 = customThemeSettingsItems.get(72).colorValue; + customTheme.commentVerticalBarColor5 = customThemeSettingsItems.get(73).colorValue; + customTheme.commentVerticalBarColor6 = customThemeSettingsItems.get(74).colorValue; + customTheme.commentVerticalBarColor7 = customThemeSettingsItems.get(75).colorValue; + customTheme.navBarColor = customThemeSettingsItems.get(76).colorValue; + customTheme.isLightStatusBar = customThemeSettingsItems.get(77).isEnabled; + customTheme.isLightNavBar = customThemeSettingsItems.get(78).isEnabled; + customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = customThemeSettingsItems.get(79).isEnabled; return customTheme; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java index 616446a4..059b575a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java @@ -281,6 +281,11 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_stickied_post_icon_tint_detail), customTheme.stickiedPostIconTint)); customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_no_preview_post_type_icon_tint), + context.getString(R.string.theme_item_no_preview_post_type_icon_tint_detail), + customTheme.noPreviewPostTypeIconTint + )); + customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_subscribed_color), context.getString(R.string.theme_item_subscribed_color_detail), customTheme.subscribed)); @@ -321,9 +326,9 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_divider_color_detail), customTheme.dividerColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( - context.getString(R.string.theme_item_no_preview_link_background_color), - context.getString(R.string.theme_item_no_preview_link_background_color_detail), - customTheme.noPreviewLinkBackgroundColor)); + context.getString(R.string.theme_item_no_preview_post_type_background_color), + context.getString(R.string.theme_item_no_preview_post_type_background_color_detail), + customTheme.noPreviewPostTypeBackgroundColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_vote_and_reply_unavailable_button_color), context.getString(R.string.theme_item_vote_and_reply_unavailable_button_color_detail), diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java index 7dd17c41..d8e53dcf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java @@ -267,6 +267,11 @@ public class CustomThemeWrapper { getDefaultColor("#0D47A1", "#1565C0", "#1565C0")); } + public int getNoPreviewPostTypeIconTint() { + return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.NO_PREVIEW_POST_TYPE_ICON_TINT, + getDefaultColor("#808080", "#808080", "#808080")); + } + public int getSubscribed() { return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.SUBSCRIBED, getDefaultColor("#FF4081", "#FF4081", "#FF4081")); @@ -317,8 +322,8 @@ public class CustomThemeWrapper { getDefaultColor("#E0E0E0", "#69666C", "#69666C")); } - public int getNoPreviewLinkBackgroundColor() { - return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.NO_PREVIEW_LINK_BACKGROUND_COLOR, + public int getNoPreviewPostTypeBackgroundColor() { + return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.NO_PREVIEW_POST_TYPE_BACKGROUND_COLOR, getDefaultColor("#E0E0E0", "#424242", "#424242")); } @@ -522,6 +527,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#0D47A1"); customTheme.username = Color.parseColor("#0D47A1"); @@ -532,7 +538,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.dividerColor = Color.parseColor("#E0E0E0"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#E0E0E0"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#E0E0E0"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#F0F0F0"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#EE02BE"); @@ -607,6 +613,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -617,7 +624,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#424242"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -692,6 +699,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -702,7 +710,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#424242"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -777,6 +785,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#FFFFFF"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#0D47A1"); customTheme.username = Color.parseColor("#0D47A1"); @@ -787,7 +796,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.dividerColor = Color.parseColor("#E0E0E0"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#000000"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#000000"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#F0F0F0"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#EE02BE"); @@ -862,6 +871,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#FFFFFF"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -872,7 +882,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#000000"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#000000"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -947,6 +957,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#FFFFFF"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -957,7 +968,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#000000"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#000000"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -1032,6 +1043,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#0D47A1"); customTheme.username = Color.parseColor("#0D47A1"); @@ -1042,7 +1054,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#B3E5F9"); customTheme.dividerColor = Color.parseColor("#E0E0E0"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#E0E0E0"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#E0E0E0"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#F0F0F0"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#EE02BE"); @@ -1117,6 +1129,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -1127,7 +1140,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#424242"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -1202,6 +1215,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#1565C0"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#1565C0"); customTheme.username = Color.parseColor("#1E88E5"); @@ -1212,7 +1226,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#424242"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3"); @@ -1287,6 +1301,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#FFFFFF"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#0D47A1"); customTheme.username = Color.parseColor("#1E88E5"); @@ -1297,7 +1312,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#5F5B85"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#5F5B85"); customTheme.dividerColor = Color.parseColor("#69666C"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#6272A4"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#6272A4"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#777C82"); customTheme.commentVerticalBarColor1 = Color.parseColor("#8BE9FD"); customTheme.commentVerticalBarColor2 = Color.parseColor("#50FA7B"); @@ -1372,6 +1387,7 @@ public class CustomThemeWrapper { customTheme.lockedIconTint = Color.parseColor("#EE7302"); customTheme.crosspostIconTint = Color.parseColor("#FF4081"); customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1"); + customTheme.noPreviewPostTypeIconTint = Color.parseColor("#808080"); customTheme.subscribed = Color.parseColor("#FF4081"); customTheme.unsubscribed = Color.parseColor("#0D47A1"); customTheme.username = Color.parseColor("#0D47A1"); @@ -1382,7 +1398,7 @@ public class CustomThemeWrapper { customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#25D5E5"); customTheme.unreadMessageBackgroundColor = Color.parseColor("#25D5E5"); customTheme.dividerColor = Color.parseColor("#E0E0E0"); - customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#E0E0E0"); + customTheme.noPreviewPostTypeBackgroundColor = Color.parseColor("#E0E0E0"); customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#F0F0F0"); customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0"); customTheme.commentVerticalBarColor2 = Color.parseColor("#EE02BE"); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ThemePreviewPostsFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ThemePreviewPostsFragment.java index 9862b8f3..9f041f27 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ThemePreviewPostsFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ThemePreviewPostsFragment.java @@ -129,7 +129,7 @@ public class ThemePreviewPostsFragment extends Fragment { crosspostImageView.setColorFilter(customTheme.crosspostIconTint, PorterDuff.Mode.SRC_IN); linkTextView.setTextColor(customTheme.secondaryTextColor); progressBar.setIndeterminateTintList(ColorStateList.valueOf(customTheme.colorAccent)); - noPreviewLinkImageView.setBackgroundColor(customTheme.noPreviewLinkBackgroundColor); + noPreviewLinkImageView.setBackgroundColor(customTheme.noPreviewPostTypeBackgroundColor); upvoteButton.setColorFilter(customTheme.postIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(customTheme.postIconAndInfoColor); downvoteButton.setColorFilter(customTheme.postIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java index 7e7a6c01..2d4c1301 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java @@ -30,7 +30,7 @@ import ml.docilealligator.infinityforreddit.User.UserDao; import ml.docilealligator.infinityforreddit.User.UserData; @Database(entities = {Account.class, SubredditData.class, SubscribedSubredditData.class, UserData.class, - SubscribedUserData.class, MultiReddit.class, CustomTheme.class, RecentSearchQuery.class, SubredditFilter.class}, version = 12) + SubscribedUserData.class, MultiReddit.class, CustomTheme.class, RecentSearchQuery.class, SubredditFilter.class}, version = 13) public abstract class RedditDataRoomDatabase extends RoomDatabase { private static RedditDataRoomDatabase INSTANCE; @@ -42,7 +42,7 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase { RedditDataRoomDatabase.class, "reddit_data") .addMigrations(MIGRATION_1_2, MIGRATION_2_3, MIGRATION_3_4, MIGRATION_4_5, MIGRATION_5_6, MIGRATION_6_7, MIGRATION_7_8, MIGRATION_8_9, - MIGRATION_9_10, MIGRATION_10_11, MIGRATION_11_12) + MIGRATION_9_10, MIGRATION_10_11, MIGRATION_11_12, MIGRATION_12_13) .build(); } } @@ -255,4 +255,12 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase { "(subreddit_name TEXT NOT NULL, type INTEGER NOT NULL, PRIMARY KEY(subreddit_name, type))"); } }; + + private static final Migration MIGRATION_12_13 = new Migration(12, 13) { + @Override + public void migrate(@NonNull SupportSQLiteDatabase database) { + database.execSQL("ALTER TABLE custom_themes" + + " ADD COLUMN no_preview_post_type_icon_tint INTEGER DEFAULT " + Color.parseColor("#808080") + " NOT NULL"); + } + }; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java index 7a720586..98998ab5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java @@ -58,6 +58,7 @@ public class CustomThemeSharedPreferencesUtils { public static final String LOCKED_ICON_TINT = "lockedIconTint"; public static final String CROSSPOST_ICON_TINT = "crosspostIconTint"; public static final String STICKIED_POST_ICON_TINT = "stickiedPost"; + public static final String NO_PREVIEW_POST_TYPE_ICON_TINT = "noPreviewPostTypeIconTint"; public static final String SUBSCRIBED = "subscribed"; public static final String UNSUBSCRIBED = "unsubscribed"; public static final String USERNAME = "username"; @@ -68,7 +69,7 @@ public class CustomThemeSharedPreferencesUtils { public static final String SINGLE_COMMENT_THREAD_BACKGROUND_COLOR = "singleCommentThreadBackgroundColor"; public static final String UNREAD_MESSAGE_BACKGROUND_COLOR = "unreadMessageBackgroundColor"; public static final String DIVIDER_COLOR = "dividerColor"; - public static final String NO_PREVIEW_LINK_BACKGROUND_COLOR = "noPreviewLinkBackgroundColor"; + public static final String NO_PREVIEW_POST_TYPE_BACKGROUND_COLOR = "noPreviewLinkBackgroundColor"; public static final String VOTE_AND_REPLY_UNAVAILABLE_BUTTON_COLOR = "voteAndReplyUnavailableButtonColor"; public static final String COMMENT_VERTICAL_BAR_COLOR_1 = "commentVerticalBarColor1"; public static final String COMMENT_VERTICAL_BAR_COLOR_2 = "commentVerticalBarColor2"; @@ -134,6 +135,7 @@ public class CustomThemeSharedPreferencesUtils { editor.putInt(LOCKED_ICON_TINT, customTheme.lockedIconTint); editor.putInt(CROSSPOST_ICON_TINT, customTheme.crosspostIconTint); editor.putInt(STICKIED_POST_ICON_TINT, customTheme.stickiedPostIconTint); + editor.putInt(NO_PREVIEW_POST_TYPE_ICON_TINT, customTheme.noPreviewPostTypeIconTint); editor.putInt(SUBSCRIBED, customTheme.subscribed); editor.putInt(UNSUBSCRIBED, customTheme.unsubscribed); editor.putInt(USERNAME, customTheme.username); @@ -144,7 +146,7 @@ public class CustomThemeSharedPreferencesUtils { editor.putInt(SINGLE_COMMENT_THREAD_BACKGROUND_COLOR, customTheme.singleCommentThreadBackgroundColor); editor.putInt(UNREAD_MESSAGE_BACKGROUND_COLOR, customTheme.unreadMessageBackgroundColor); editor.putInt(DIVIDER_COLOR, customTheme.dividerColor); - editor.putInt(NO_PREVIEW_LINK_BACKGROUND_COLOR, customTheme.noPreviewLinkBackgroundColor); + editor.putInt(NO_PREVIEW_POST_TYPE_BACKGROUND_COLOR, customTheme.noPreviewPostTypeBackgroundColor); editor.putInt(VOTE_AND_REPLY_UNAVAILABLE_BUTTON_COLOR, customTheme.voteAndReplyUnavailableButtonColor); editor.putInt(COMMENT_VERTICAL_BAR_COLOR_1, customTheme.commentVerticalBarColor1); editor.putInt(COMMENT_VERTICAL_BAR_COLOR_2, customTheme.commentVerticalBarColor2); |