From 50da29ad8c507898b337b0ebcb84b34ef1680978 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 18 Sep 2019 16:01:08 +0800 Subject: Saving and unsaving comments are now available. Use xml thumbtack to avoid crashes on low resolution devices. Add a subreddit link in Settings -> About. --- app/src/main/java/Settings/AboutPreferenceFragment.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/src/main/java/Settings') diff --git a/app/src/main/java/Settings/AboutPreferenceFragment.java b/app/src/main/java/Settings/AboutPreferenceFragment.java index 8d93bd6c..f2ba0518 100644 --- a/app/src/main/java/Settings/AboutPreferenceFragment.java +++ b/app/src/main/java/Settings/AboutPreferenceFragment.java @@ -27,6 +27,7 @@ public class AboutPreferenceFragment extends PreferenceFragmentCompat { Preference reviewPreference = findPreference(SharedPreferencesUtils.RATE_KEY); Preference emailPreference = findPreference(SharedPreferencesUtils.EMAIL_KEY); Preference redditAccountPreference = findPreference(SharedPreferencesUtils.REDDIT_ACCOUNT_KEY); + Preference subredditPreference = findPreference(SharedPreferencesUtils.SUBREDDIT_KEY); Activity activity = getActivity(); @@ -76,6 +77,15 @@ public class AboutPreferenceFragment extends PreferenceFragmentCompat { return true; }); } + + if(subredditPreference != null) { + subredditPreference.setOnPreferenceClickListener(preference -> { + Intent intent = new Intent(activity, LinkResolverActivity.class); + intent.setData(Uri.parse("https://www.reddit.com/r/Infinity_For_Reddit")); + startActivity(intent); + return true; + }); + } } } } -- cgit v1.2.3