From ae1846cfe3bfab6f78cbb5b3f6627aa7337bbf52 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:34:28 -0500 Subject: [PATCH] Version 7.4.1. Hide the NSFW toggle when in PostXXXActivity. Refine warning message in NsfwAndSpoilerFragment. Good job Google. --- .../infinityforreddit/settings/NsfwAndSpoilerFragment.java | 4 ++-- app/src/main/res/layout/activity_post_gallery.xml | 1 + app/src/main/res/layout/activity_post_image.xml | 1 + app/src/main/res/layout/activity_post_link.xml | 1 + app/src/main/res/layout/activity_post_poll.xml | 1 + app/src/main/res/layout/activity_post_text.xml | 1 + app/src/main/res/layout/activity_post_video.xml | 1 + app/src/main/res/values/strings.xml | 4 ++-- 8 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java index c9e455c996..b737d5111a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java @@ -162,7 +162,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, TextView messageTextView = new TextView(activity); int padding = (int) Utils.convertDpToPixel(24, activity); messageTextView.setPaddingRelative(padding, padding, padding, padding); - SpannableString message = new SpannableString(getString(R.string.user_agreement_message_sensitive_content, "https://www.redditinc.com/policies/user-agreement", "https://docile-alligator.github.io")); + SpannableString message = new SpannableString(getString(R.string.warning_message_sensitive_content, "https://www.redditinc.com/policies/user-agreement", "https://docile-alligator.github.io")); Linkify.addLinks(message, Linkify.WEB_URLS); messageTextView.setMovementMethod(BetterLinkMovementMethod.newInstance().setOnLinkClickListener((textView, url) -> { Intent intent = new Intent(activity, LinkResolverActivity.class); @@ -173,7 +173,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, messageTextView.setLinkTextColor(getResources().getColor(R.color.colorAccent)); messageTextView.setText(message); new MaterialAlertDialogBuilder(activity, R.style.MaterialAlertDialogTheme) - .setTitle(getString(R.string.user_agreement_dialog_title)) + .setTitle(getString(R.string.warning)) .setView(messageTextView) .setPositiveButton(R.string.agree, (dialogInterface, i) -> dialogInterface.dismiss()) .setNegativeButton(R.string.do_not_agree, (dialogInterface, i) -> activity.onBackPressed()) diff --git a/app/src/main/res/layout/activity_post_gallery.xml b/app/src/main/res/layout/activity_post_gallery.xml index 4e212e7f7c..5679f838bf 100644 --- a/app/src/main/res/layout/activity_post_gallery.xml +++ b/app/src/main/res/layout/activity_post_gallery.xml @@ -155,6 +155,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index ca03fbd9f9..eb699f0c82 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -155,6 +155,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index 0a819666e3..9d9f564c00 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -155,6 +155,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_poll.xml b/app/src/main/res/layout/activity_post_poll.xml index e54d988f7b..60f2515dd5 100644 --- a/app/src/main/res/layout/activity_post_poll.xml +++ b/app/src/main/res/layout/activity_post_poll.xml @@ -156,6 +156,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index dd83a8bc73..86d8c69707 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -152,6 +152,7 @@ android:text="@string/nsfw" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 72cbcd5746..63e25df6a1 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -155,6 +155,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" + android:visibility="gone" app:lib_setRadius="6dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 492c09fe1a..cdec60e971 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -606,7 +606,7 @@ Default Search Result Tab Crash Reports Dangerous - Forever Family Friendly + Forever Disable Senstive Content Show Only One Comment Level Indicator Switch to Landscape Orientation in Video Player Automatically Loop Video @@ -1354,7 +1354,7 @@ User Agreement You need to agree to Reddit User Agreement (%1$s) and Infinity for Reddit\'s Privacy Policy (%2$s) before logging in.\n\nFrom now on, you will need a monthly subscription to access the Reddit API within Infinity for Reddit and this is because Reddit has started charging for API access since July 1st, 2023. - You need to agree to Reddit User Agreement (%1$s) and Infinity for Reddit\'s Privacy Policy (%2$s) before changing these settings. + Infinity neither promotes nor recommends sensitive content. Due to Reddit\'s policy, you are unlikely to encounter sensitive content within the app. You need to agree to Reddit User Agreement (%1$s) and Infinity for Reddit\'s Privacy Policy (%2$s) before changing these settings. Agree Don\'t Agree