feat: Improve logout handling and back navigation in AuthFlow for better user experience

This commit is contained in:
k1ngsterr1
2026-01-09 23:32:57 +05:00
parent 2d7dbe88a5
commit 1b860e1c3e
2 changed files with 27 additions and 4 deletions

View File

@@ -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
}
}
)