diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-05-14 02:27:35 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-05-14 02:27:35 +0000 |
commit | 2204b72484f9b143ff28e249f2eac3cc900ed3d0 (patch) | |
tree | 0f67e0c1cd0ee91bc7d332dfbfc01ecf2356b86d /app/src/main/java/ml/docilealligator/infinityforreddit | |
parent | 967e6ec26181326a1ff2b6bd80664c7ce4e2c983 (diff) | |
download | infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar.gz infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar.bz2 infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar.lz infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar.xz infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.tar.zst infinity-for-reddit-2204b72484f9b143ff28e249f2eac3cc900ed3d0.zip |
Fix string value for popular.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CustomizeMainPageTabsFragment.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CustomizeMainPageTabsFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CustomizeMainPageTabsFragment.java index 89e212dc..01e2c28e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CustomizeMainPageTabsFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CustomizeMainPageTabsFragment.java @@ -55,15 +55,15 @@ public class CustomizeMainPageTabsFragment extends PreferenceFragmentCompat { EditTextPreference tab3NamePreference = findPreference(SharedPreferencesUtils.MAIN_PAGE_TAB_3_NAME); if (tab1TitlePreference != null && tab1PostTypePreference != null && tab1NamePreference != null) { - String string = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_1_POST_TYPE, + String postType = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_1_POST_TYPE, SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HOME); - if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(string)) { + if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(postType)) { tab1NamePreference.setVisible(true); tab1NamePreference.setTitle(R.string.settings_tab_subreddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(postType)) { tab1NamePreference.setVisible(true); tab1NamePreference.setTitle(R.string.settings_tab_multi_reddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(postType)) { tab1NamePreference.setVisible(true); tab1NamePreference.setTitle(R.string.settings_tab_username); } @@ -92,15 +92,15 @@ public class CustomizeMainPageTabsFragment extends PreferenceFragmentCompat { } if (tab2TitlePreference != null && tab2PostTypePreference != null && tab2NamePreference != null) { - String string = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_2_POST_TYPE, - SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HOME); - if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(string)) { + String postType = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_2_POST_TYPE, + SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_POPULAR); + if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(postType)) { tab2NamePreference.setVisible(true); tab2NamePreference.setTitle(R.string.settings_tab_subreddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(postType)) { tab2NamePreference.setVisible(true); tab2NamePreference.setTitle(R.string.settings_tab_multi_reddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(postType)) { tab2NamePreference.setVisible(true); tab2NamePreference.setTitle(R.string.settings_tab_username); } @@ -129,15 +129,15 @@ public class CustomizeMainPageTabsFragment extends PreferenceFragmentCompat { } if (tab3TitlePreference != null && tab3PostTypePreference != null && tab3NamePreference != null) { - String string = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_3_POST_TYPE, - SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HOME); - if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(string)) { + String postType = mSharedPreferences.getString(SharedPreferencesUtils.MAIN_PAGE_TAB_3_POST_TYPE, + SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_ALL); + if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SUBREDDIT.equals(postType)) { tab3NamePreference.setVisible(true); tab3NamePreference.setTitle(R.string.settings_tab_subreddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_MULTIREDDIT.equals(postType)) { tab3NamePreference.setVisible(true); tab3NamePreference.setTitle(R.string.settings_tab_multi_reddit_name); - } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(string)) { + } else if (SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_USER.equals(postType)) { tab3NamePreference.setVisible(true); tab3NamePreference.setTitle(R.string.settings_tab_username); } |