feat: Improve logout handling and back navigation in AuthFlow for better user experience
This commit is contained in:
@@ -164,10 +164,11 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
},
|
||||
onLogout = {
|
||||
// Set currentAccount to null immediately to prevent UI lag
|
||||
currentAccount = null
|
||||
scope.launch {
|
||||
com.rosetta.messenger.network.ProtocolManager.disconnect()
|
||||
accountManager.logout()
|
||||
currentAccount = null
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -182,10 +183,11 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
},
|
||||
onLogout = {
|
||||
// Set currentAccount to null immediately to prevent UI lag
|
||||
currentAccount = null
|
||||
scope.launch {
|
||||
com.rosetta.messenger.network.ProtocolManager.disconnect()
|
||||
accountManager.logout()
|
||||
currentAccount = null
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user