mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-26 23:10:32 +05:30
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:
commit
266f1e8ca2
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user