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:
parent
8c255b55fd
commit
17dec236c2
1 changed files with 6 additions and 4 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue