diff options
19 files changed, 146 insertions, 106 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); diff --git a/app/src/main/res/layout/item_post_detail_no_preview_link.xml b/app/src/main/res/layout/item_post_detail_no_preview.xml index 7b6d5778..de21d76f 100644 --- a/app/src/main/res/layout/item_post_detail_no_preview_link.xml +++ b/app/src/main/res/layout/item_post_detail_no_preview.xml @@ -214,12 +214,10 @@ android:fontFamily="?attr/font_family" /> <ImageView - android:id="@+id/image_view_no_preview_link_item_post_detail_no_preview_link" + android:id="@+id/image_view_no_preview_post_type_item_post_detail_no_preview_link" android:layout_width="match_parent" android:layout_height="150dp" - android:scaleType="center" - android:src="@drawable/ic_link" - app:tint="@android:color/tab_indicator_text" /> + android:scaleType="center" /> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post_with_preview.xml b/app/src/main/res/layout/item_post_with_preview.xml index b57867df..45bb6a1f 100644 --- a/app/src/main/res/layout/item_post_with_preview.xml +++ b/app/src/main/res/layout/item_post_with_preview.xml @@ -277,8 +277,6 @@ android:layout_width="match_parent" android:layout_height="150dp" android:scaleType="center" - android:src="@drawable/ic_link" - app:tint="@android:color/tab_indicator_text" android:visibility="gone" /> <androidx.constraintlayout.widget.ConstraintLayout diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5cb295fe..159ec61d 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -642,8 +642,8 @@ Funktioniert vielleicht nicht auf Android 11"</string> <string name="theme_item_unread_message_background_color_detail">"Angewandt auf: Hintergrundfarbe für ungelesene Nachrichten"</string> <string name="theme_item_divider_color">"Farbe für Trennleiste"</string> <string name="theme_item_divider_color_detail">"Angewandt auf: Trennleisten in Kommentaren, auf Seiten zum Einreichen von Beiträgen, usw."</string> - <string name="theme_item_no_preview_link_background_color">"Hintergrundfarbe für Links ohne Vorschau"</string> - <string name="theme_item_no_preview_link_background_color_detail">"Angewandt auf: Platzhalter für Links ohne Vorschau"</string> + <string name="theme_item_no_preview_post_type_background_color">"Hintergrundfarbe für Links ohne Vorschau"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"Angewandt auf: Platzhalter für Links ohne Vorschau"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Farbe für deaktivierte Abstimmungs- und Antwort-Knöpfe"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"Angewandt auf: Abstimmungs- und Antwort-Knöpfe (nicht verfügbar)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Farbe 1 für vertikale Leiste in Kommenatren"</string> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index ff2dd86d..8b9dae63 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -634,8 +634,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"Aplicado a: Fondo de Mensaje No Leído"</string> <string name="theme_item_divider_color">"Color de Barra Divisora"</string> <string name="theme_item_divider_color_detail">"Aplicado a: Divisor de comentarios, divisor en páginas para publicar, etc."</string> - <string name="theme_item_no_preview_link_background_color">"Color de Enlace Sin Vista Previa"</string> - <string name="theme_item_no_preview_link_background_color_detail">"Aplicado a: Lugar de Enlace Sin Vista Previa"</string> + <string name="theme_item_no_preview_post_type_background_color">"Color de Enlace Sin Vista Previa"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"Aplicado a: Lugar de Enlace Sin Vista Previa"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Color de Voto No Disponible"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"Aplicado a: Botones de voto y respuesta (No Disponible)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Color 1 de la Barra Vertical de Comentario"</string> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 3dc93012..554cbb1c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -683,8 +683,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"S'applique à: Couleur d'arrière-plan des messages non lus"</string> <string name="theme_item_divider_color">"Couleur du séparateur"</string> <string name="theme_item_divider_color_detail">"S'applique à: Séparateur de commentaires, séparateurs dans les pages pour la soumission de publications, etc."</string> - <string name="theme_item_no_preview_link_background_color">"Couleur d'arrière-plan du lien sans aperçu"</string> - <string name="theme_item_no_preview_link_background_color_detail">"S'applique à: espace réservé du lien sans aperçu"</string> + <string name="theme_item_no_preview_post_type_background_color">"Couleur d'arrière-plan du lien sans aperçu"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"S'applique à: espace réservé du lien sans aperçu"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Couleur des boutons Voter et Répondre indisponibles"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"S'applique à: Boutons Voter et Répondre (indisponibles)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Couleur 1 de la barre verticale de commentaire"</string> diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 8dfad5fd..de24898c 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -658,8 +658,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"पर लागू होगा: अपठित संदेश पृष्टभूमि रंग "</string> <string name="theme_item_divider_color">"विभाजक रंग "</string> <string name="theme_item_divider_color_detail">"पर लागू होगा: टिप्पणी विभाजक, पोस्ट जमा करने के लिए पृष्ठों में विभाजक, इत्यादि "</string> - <string name="theme_item_no_preview_link_background_color">"कोई पूर्वदर्शन लिंक नहीं पृष्टभूमि रंग "</string> - <string name="theme_item_no_preview_link_background_color_detail">"पर लागू होगा: कोई पूर्वदर्शन लिंक नहीं"</string> + <string name="theme_item_no_preview_post_type_background_color">"कोई पूर्वदर्शन लिंक नहीं पृष्टभूमि रंग "</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"पर लागू होगा: कोई पूर्वदर्शन लिंक नहीं"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"वोट एवं उत्तर अनुपलब्ध बटन का रंग "</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"पर लागू होगा: वोट एवं उत्तर बटन्स (अनुपलब्ध)"</string> <string name="theme_item_comment_vertical_bar_color_1">"टिप्पणी ऊर्ध्वाधर बार रंग 1"</string> diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index bf916b5a..16710cbc 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -635,8 +635,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"Primijenjeno na: Boju pozadine nepročitane poruke"</string> <string name="theme_item_divider_color">"Boja razdjelnika"</string> <string name="theme_item_divider_color_detail">"Primijenjeno na: Razdjelnik komentara, razdjelnike na stranicama za objavljivanje, itd."</string> - <string name="theme_item_no_preview_link_background_color">"Boja pozadine poveznice bez prethodnog pregleda"</string> - <string name="theme_item_no_preview_link_background_color_detail">"Primijenjeno na: Placeholder za poveznicu bez prethodnog pregleda"</string> + <string name="theme_item_no_preview_post_type_background_color">"Boja pozadine poveznice bez prethodnog pregleda"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"Primijenjeno na: Placeholder za poveznicu bez prethodnog pregleda"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Boja gumbiju za glasanje i odgovaranje kada su nedostupni"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"Primijenjeno na: Gumbe za glasanje i odgovaranje (nedostupni)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Boja vertikalne trake komentara 1"</string> diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d64e14dd..06a71151 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -660,8 +660,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"Applicato a: Colore di sfondo del messaggio non letto"</string> <string name="theme_item_divider_color">"Colore Divisore"</string> <string name="theme_item_divider_color_detail">"Applicato a: Divisore di commento, divisori in pagine per l'invio di post, ecc."</string> - <string name="theme_item_no_preview_link_background_color">"Colore di sfondo del link senza anteprima"</string> - <string name="theme_item_no_preview_link_background_color_detail">"Applicato a: Segnaposto per link senza anteprima"</string> + <string name="theme_item_no_preview_post_type_background_color">"Colore di sfondo del link senza anteprima"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"Applicato a: Segnaposto per link senza anteprima"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Colore Pulsante Vota e Rispondi Non Disponibile"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"Applicato a: Bottoni vota e rispondi (Non disponibili)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Commento Colore Barra Verticale 1"</string> diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 4bcff9c2..4bc9fc5e 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -671,8 +671,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"適用先: 未読メッセージの背景"</string> <string name="theme_item_divider_color">"分割線"</string> <string name="theme_item_divider_color_detail">"適用先: コメントの分割線、投稿時のページ分割線、等"</string> - <string name="theme_item_no_preview_link_background_color">"プレビューのないリンク 背景"</string> - <string name="theme_item_no_preview_link_background_color_detail">"適用先: プレビューのないリンクの背景"</string> + <string name="theme_item_no_preview_post_type_background_color">"プレビューのないリンク 背景"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"適用先: プレビューのないリンクの背景"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"評価と返信ボタン 無効状態"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"適用先: 無効となっている評価と返信ボタン"</string> <string name="theme_item_comment_vertical_bar_color_1">"コメント 縦線1"</string> diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 6e1f8037..c7dbc5a3 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -630,8 +630,8 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd <string name="theme_item_unread_message_background_color_detail">"Aplicado para: cor de fundo de mensagem não lida"</string> <string name="theme_item_divider_color">"Cor de divisor"</string> <string name="theme_item_divider_color_detail">"Aplicado para: divisor de comentários, páginas, etc."</string> - <string name="theme_item_no_preview_link_background_color">"Cor de fundo de link sem pré-visualização"</string> - <string name="theme_item_no_preview_link_background_color_detail">"Aplicado para: link sem pré-visualização"</string> + <string name="theme_item_no_preview_post_type_background_color">"Cor de fundo de link sem pré-visualização"</string> + <string name="theme_item_no_preview_post_type_background_color_detail">"Aplicado para: link sem pré-visualização"</string> <string name="theme_item_vote_and_reply_unavailable_button_color">"Cor de botão de votação e respostas"</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">"Aplicado para: botões de votação e respostas (indisponíveis)"</string> <string name="theme_item_comment_vertical_bar_color_1">"Cor 1 de barra vertical de comentário"</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c41f082e..bf0a7866 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -715,6 +715,8 @@ <string name="theme_item_crosspost_icon_tint_detail">Applied to: Crosspost icon</string> <string name="theme_item_stickied_post_icon_tint">Stickied Post Icon Color</string> <string name="theme_item_stickied_post_icon_tint_detail">Applied to: Stickied post icon</string> + <string name="theme_item_no_preview_post_type_icon_tint">No-preview Post Type Icon Color</string> + <string name="theme_item_no_preview_post_type_icon_tint_detail">Applied to: Icon indicating the type of post when there is no preview available</string> <string name="theme_item_subscribed_color">Subscribed</string> <string name="theme_item_subscribed_color_detail">Applied to: Unsubscribe button</string> <string name="theme_item_unsubscribed_color">Unsubscribed</string> @@ -735,8 +737,8 @@ <string name="theme_item_unread_message_background_color_detail">Applied to: Unread Message Background Color</string> <string name="theme_item_divider_color">Divider Color</string> <string name="theme_item_divider_color_detail">Applied to: Comment divider, dividers in pages for submitting posts, etc.</string> - <string name="theme_item_no_preview_link_background_color">No-Preview Link Background Color</string> - <string name="theme_item_no_preview_link_background_color_detail">Applied to: No-preview link placeholder</string> + <string name="theme_item_no_preview_post_type_background_color">No-preview Post Type Background Color</string> + <string name="theme_item_no_preview_post_type_background_color_detail">Applied to: Placeholder indicating the type of post when there is no preview available</string> <string name="theme_item_vote_and_reply_unavailable_button_color">Vote and Reply Unavailable Button Color</string> <string name="theme_item_vote_and_reply_unavailable_button_color_detail">Applied to: Vote and reply buttons (Unavailable)</string> <string name="theme_item_comment_vertical_bar_color_1">Comment Vertical Bar Color 1</string> |