mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fix crash when starting app from next up (#730)
## Description Fixes a possible crash starting the app from the next up row ### Related issues Fixes #729
This commit is contained in:
parent
7a20fedef4
commit
81d7aad0c6
2 changed files with 10 additions and 2 deletions
|
|
@ -150,7 +150,6 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
viewModel.appStart()
|
||||
val requestedDestination = this.intent?.let(::extractDestination)
|
||||
setContent {
|
||||
val appPreferences by userPreferencesDataStore.data.collectAsState(null)
|
||||
appPreferences?.let { appPreferences ->
|
||||
|
|
@ -257,6 +256,10 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
if (showContent) {
|
||||
val requestedDestination =
|
||||
remember(intent) {
|
||||
intent?.let(::extractDestination)
|
||||
}
|
||||
ApplicationContent(
|
||||
user = current.user,
|
||||
server = current.server,
|
||||
|
|
@ -344,6 +347,7 @@ class MainActivity : AppCompatActivity() {
|
|||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
Timber.v("onNewIntent")
|
||||
setIntent(intent)
|
||||
extractDestination(intent)?.let {
|
||||
navigationManager.replace(it)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue