1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-21 23:54:26 +00:00

Load saved session if available

This commit is contained in:
Steffo 2023-11-24 19:20:11 +01:00
parent 8c255b55fd
commit 17dec236c2
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -42,16 +42,18 @@ class MatrixActivity : ComponentActivity() {
}
}
}
}
override fun onStart() {
super.onStart()
// Check if there's a session already stored
session = TwoMMatrix.matrix.authenticationService().getLastAuthenticatedSession()
setContent {
MatrixActivityScaffold(
onClickLogin = this::onClickLogin
onClickLogin = this::onClickLogin,
session = session,
)
}
// No onStart is needed, as session already sets content when it's changed
}
private fun onClickLogin() {