Handle activity and process recreation for session
This commit is contained in:
parent
fe5541b243
commit
581d002918
9 changed files with 186 additions and 31 deletions
|
|
@ -36,6 +36,7 @@ class MainActivity : NodeComponentActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
val appBindings = bindings<AppBindings>()
|
||||
appBindings.matrixClientsHolder().restore(savedInstanceState)
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
setContent {
|
||||
ElementXTheme {
|
||||
|
|
@ -48,11 +49,17 @@ class MainActivity : NodeComponentActivity() {
|
|||
buildContext = it,
|
||||
appComponentOwner = applicationContext as DaggerComponentOwner,
|
||||
authenticationService = appBindings.authenticationService(),
|
||||
presenter = appBindings.rootPresenter()
|
||||
presenter = appBindings.rootPresenter(),
|
||||
matrixClientsHolder = appBindings.matrixClientsHolder()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
bindings<AppBindings>().matrixClientsHolder().onSaveInstanceState(outState)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue