mirror of
https://github.com/Steffo99/twom.git
synced 2024-11-25 17:44:24 +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() {
|
// Check if there's a session already stored
|
||||||
super.onStart()
|
session = TwoMMatrix.matrix.authenticationService().getLastAuthenticatedSession()
|
||||||
|
|
||||||
setContent {
|
setContent {
|
||||||
MatrixActivityScaffold(
|
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() {
|
private fun onClickLogin() {
|
||||||
|
|
Loading…
Reference in a new issue