Fix title resets that occur after a screen rotation

This commit is contained in:
iovxw 2026-07-21 21:38:34 +08:00
parent eac752e60d
commit 8d2f05713d
No known key found for this signature in database
GPG Key ID: C84626C2D3D79995

View File

@ -66,7 +66,7 @@ class MainActivity : AppCompatActivity() {
navController = binding.navHostFragment.getFragment<NavHostFragment>().navController
navController.graph = SettingsRoute.createGraph(navController)
viewModel.toolbarTitle.observe(this) {
binding.toolbar.title = it
supportActionBar!!.title = it
}
viewModel.toolbarShadow.observe(this) {
binding.toolbar.elevation = dp(if (it) 4f else 0f)