Skip to content

Commit

Permalink
Version 7.4.1. Hide the NSFW toggle when in PostXXXActivity. Refine w…
Browse files Browse the repository at this point in the history
…arning message in NsfwAndSpoilerFragment. Good job Google.
  • Loading branch information
Docile-Alligator committed Nov 16, 2024
1 parent e329e89 commit ae1846c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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())
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_gallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_link.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_poll.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_post_video.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
<string name="settings_default_search_result_tab">Default Search Result Tab</string>
<string name="settings_crash_reports_title">Crash Reports</string>
<string name="settings_nsfw_and_spoiler_dangerous_group_title">Dangerous</string>
<string name="settings_disable_over_18_forever_title">Forever Family Friendly</string>
<string name="settings_disable_over_18_forever_title">Forever Disable Senstive Content</string>
<string name="settings_show_only_one_comment_level_indicator">Show Only One Comment Level Indicator</string>
<string name="settings_video_player_automatic_landscape_orientation">Switch to Landscape Orientation in Video Player Automatically</string>
<string name="settings_loop_video_title">Loop Video</string>
Expand Down Expand Up @@ -1354,7 +1354,7 @@

<string name="user_agreement_dialog_title">User Agreement</string>
<string name="user_agreement_message">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.</string>
<string name="user_agreement_message_sensitive_content">You need to agree to Reddit User Agreement (%1$s) and Infinity for Reddit\'s Privacy Policy (%2$s) before changing these settings.</string>
<string name="warning_message_sensitive_content">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.</string>
<string name="agree">Agree</string>
<string name="do_not_agree">Don\'t Agree</string>

Expand Down

0 comments on commit ae1846c

Please sign in to comment.