aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorSergei Kozelko <KozelkoS@yandex.ru>2022-11-05 14:22:02 +0000
committerGitHub <noreply@github.com>2022-11-05 14:22:02 +0000
commitff10eb5f92810f2f1a1ca2ba5617a035957509ad (patch)
tree514909edcc4cd8685a6b1486e60f97462b3bb543 /app/src/main/java/ml/docilealligator/infinityforreddit
parent0ae9b74729b0ee072bb92dbcfbe3391edabe1c5a (diff)
downloadinfinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar.gz
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar.bz2
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar.lz
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar.xz
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.tar.zst
infinity-for-reddit-ff10eb5f92810f2f1a1ca2ba5617a035957509ad.zip
Load sort type from correct shared preferences (#1202)
When extracting sort type loading logic the shared preferences that are used to load sort type got accidentally changed to the wrong ones. This resulted in always using the default value which is displayed as Best. Fortunately the saving code was not changed so only reading has to be fixed.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
index 8fb165a8..a6e3e243 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
@@ -814,11 +814,11 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
@NonNull
private SortType.Type loadSortType() {
- String sortTypeName = mSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.CONFIDENCE.name());
+ String sortTypeName = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.CONFIDENCE.name());
if (SortType.Type.BEST.name().equals(sortTypeName)) {
// migrate from BEST to CONFIDENCE
// key guaranteed to exist because got non-default value
- mSharedPreferences.edit()
+ mSortTypeSharedPreferences.edit()
.putString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.CONFIDENCE.name())
.apply();
return SortType.Type.CONFIDENCE;