aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2022-06-11 12:21:17 +0000
committerDocile-Alligator <chineseperson5@gmail.com>2022-06-11 12:21:17 +0000
commit2ebc797a3b1c903105b00775b74e67b8e7c785a4 (patch)
treeaf40c2497be76205a0c9217a128edaffee6d4742 /app/src/main/java/ml/docilealligator/infinityforreddit
parent92cb309bf603a69a143412900bfb5c45349b92a9 (diff)
downloadinfinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar.gz
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar.bz2
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar.lz
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar.xz
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.tar.zst
infinity-for-reddit-2ebc797a3b1c903105b00775b74e67b8e7c785a4.zip
Fix post layout not saved for anonymous multireddits.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
index de518519..1d717a3e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
@@ -787,7 +787,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
sortType = new SortType(SortType.Type.valueOf(sort));
}
- postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout);
+ postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath, defaultPostLayout);
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mGfycatRetrofit,
mRedgifsRetrofit, mStreamableRetrofit, mCustomThemeWrapper, locale,
@@ -1573,6 +1573,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
if (!temporary) {
switch (postType) {
case PostPagingSource.TYPE_FRONT_PAGE:
+ case PostPagingSource.TYPE_ANONYMOUS_FRONT_PAGE:
mPostLayoutSharedPreferences.edit().putInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, postLayout).apply();
break;
case PostPagingSource.TYPE_SUBREDDIT:
@@ -1585,6 +1586,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mPostLayoutSharedPreferences.edit().putInt(SharedPreferencesUtils.POST_LAYOUT_SEARCH_POST, postLayout).apply();
break;
case PostPagingSource.TYPE_MULTI_REDDIT:
+ case PostPagingSource.TYPE_ANONYMOUS_MULTIREDDIT:
mPostLayoutSharedPreferences.edit().putInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath, postLayout).apply();
break;
}