When logging out, remove the scene's active account rather than the most-recently activated one, as they may not be the same
This commit is contained in:
parent
b45d3fb80a
commit
acd48a6db4
|
@ -211,7 +211,10 @@ class MainSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDelegate
|
||||||
}
|
}
|
||||||
|
|
||||||
func logoutCurrent() {
|
func logoutCurrent() {
|
||||||
LocalData.shared.removeAccount(LocalData.shared.getMostRecentAccount()!)
|
guard let account = window?.windowScene?.session.mastodonController?.accountInfo else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
LocalData.shared.removeAccount(account)
|
||||||
if LocalData.shared.onboardingComplete {
|
if LocalData.shared.onboardingComplete {
|
||||||
activateAccount(LocalData.shared.accounts.first!, animated: false)
|
activateAccount(LocalData.shared.accounts.first!, animated: false)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue