Skip to content

Commit

Permalink
fix: update toptoast context on config change
Browse files Browse the repository at this point in the history
  • Loading branch information
aliernfrog committed Sep 11, 2024
1 parent 3988b2d commit d703ea6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ class MainActivity : AppCompatActivity() {
}
LaunchedEffect(Unit) {
mainViewModel.scope = scope
if (isAppInitialized) return@LaunchedEffect
mainViewModel.topToastState.setComposeView(view)
if (isAppInitialized) return@LaunchedEffect

mainViewModel.topToastState.setAppTheme { AppTheme(it) }

if (mainViewModel.prefs.autoCheckUpdates.value) mainViewModel.checkUpdates()

this@MainActivity.intent?.let {
mainViewModel.handleIntent(it, context = context)
}

isAppInitialized = true
}
}
Expand Down

0 comments on commit d703ea6

Please sign in to comment.