aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-09-12 10:13:59 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-09-12 10:13:59 +0000
commit4ac9784ab109bed94c1808e6af83d85d9dab35c5 (patch)
treed128262d249651441a542232e515b38b66ad186b /app/src/main/java/ml
parent64390d4a5b2c118155d245721567a91181706e3f (diff)
downloadinfinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar.gz
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar.bz2
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar.lz
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar.xz
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.tar.zst
infinity-for-reddit-4ac9784ab109bed94c1808e6af83d85d9dab35c5.zip
Add more info in settings->about. Fix title mismatch in settings.
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SettingsActivity.java11
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java4
2 files changed, 11 insertions, 4 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SettingsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SettingsActivity.java
index 41c82e41..f963b0a4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SettingsActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SettingsActivity.java
@@ -19,6 +19,7 @@ import androidx.preference.PreferenceFragmentCompat;
import javax.inject.Inject;
+import Settings.AboutPreferenceFragment;
import Settings.MainPreferenceFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -84,10 +85,12 @@ public class SettingsActivity extends AppCompatActivity implements
setTitle(savedInstanceState.getCharSequence(TITLE_STATE));
}
getSupportFragmentManager().addOnBackStackChangedListener(() -> {
- if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
- setTitle(R.string.settings_activity_label);
- }
- });
+ if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
+ setTitle(R.string.settings_activity_label);
+ } else if (getSupportFragmentManager().findFragmentById(R.id.frame_layout_settings_activity) instanceof AboutPreferenceFragment) {
+ setTitle(R.string.settings_about_master_title);
+ }
+ });
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
index fd7dc27f..6c4ca027 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java
@@ -17,4 +17,8 @@ public class SharedPreferencesUtils {
public static final String CROSSPOST_ICON_KEY = "crosspost_icon";
public static final String THUMBTACK_ICON_KEY = "thumbtack_icon";
public static final String MATERIAL_ICONS_KEY = "material_icons";
+ public static final String OPEN_SOURCE_KEY = "open_source";
+ public static final String RATE_KEY = "rate";
+ public static final String EMAIL_KEY = "email";
+ public static final String REDDIT_ACCOUNT_KEY = "reddit_account";
}