Merge pull request #7351 from Bnyro/master

fix: automatically log user out when enabling full local mode and no auth instance set
This commit is contained in:
Bnyro 2025-04-25 17:08:33 +02:00 committed by GitHub
commit 266f1e8ca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,6 +126,13 @@ class InstanceSettings : BasePreferenceFragment() {
.show(childFragmentManager, DeleteAccountDialog::class.java.name)
true
}
findPreference<SwitchPreferenceCompat>(PreferenceKeys.FULL_LOCAL_MODE)?.setOnPreferenceChangeListener { _, newValue ->
// when the full local mode gets enabled, the fetch instance is no longer used and replaced
// fully by local extraction. thus, the user has to be logged out from the fetch instance
if (newValue == true && !authInstanceToggle.isChecked) logoutAndUpdateUI()
true
}
}
private suspend fun initInstancesPref(