Fix unintended [mismatched] show-replies preference (with key force-reset) (#2568)

* Fix unintended [mismatched] show-replies preference and add a comment to prevent confusion.

* Change the key on TAB_FILTER_HOME_REPLIES to reset everyone's value here once.
This commit is contained in:
mcclure 2022-05-29 13:21:33 -04:00 committed by GitHub
parent d2befa83d3
commit 06e32f703a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class TabFilterPreferencesFragment : PreferenceFragmentCompat() {
checkBoxPreference {
setTitle(R.string.pref_title_show_replies)
key = PrefKeys.TAB_FILTER_HOME_REPLIES
setDefaultValue(false)
setDefaultValue(true)
isIconSpaceReserved = false
}
}

View File

@ -81,6 +81,7 @@ abstract class TimelineViewModel(
this.tags = tags
if (kind == Kind.HOME) {
// Note the variable is "true if filter" but the underlying preference/settings text is "true if show"
filterRemoveReplies =
!sharedPreferences.getBoolean(PrefKeys.TAB_FILTER_HOME_REPLIES, true)
filterRemoveReblogs =

View File

@ -62,6 +62,6 @@ object PrefKeys {
const val NOTIFICATION_FILTER_SIGN_UPS = "notificationFilterSignUps"
const val NOTIFICATION_FILTER_UPDATES = "notificationFilterUpdates"
const val TAB_FILTER_HOME_REPLIES = "tabFilterHomeReplies"
const val TAB_FILTER_HOME_REPLIES = "tabFilterHomeReplies_v2" // This was changed once to reset an unintentionally set default.
const val TAB_FILTER_HOME_BOOSTS = "tabFilterHomeBoosts"
}