Skip to content

Commit

Permalink
#1274 fix: after tapping the notification, do not navigate to the adv…
Browse files Browse the repository at this point in the history
…anced triggers bottom sheet after a configuration change
  • Loading branch information
sds100 committed Dec 8, 2024
1 parent 8e02a62 commit de67923
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ActivityViewModel(
PopupViewModel by PopupViewModelImpl(),
NavigationViewModel by NavigationViewModelImpl() {

var handledActivityLaunchIntent: Boolean = false
var previousNightMode: Int? = null

fun onCantFindAccessibilitySettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ abstract class BaseMainActivity : AppCompatActivity() {
// Must launch when the activity is resumed
// so the nav controller can be found
launchRepeatOnLifecycle(Lifecycle.State.RESUMED) {
if (viewModel.handledActivityLaunchIntent) {
return@launchRepeatOnLifecycle
}

when (intent.action) {
ACTION_SHOW_ACCESSIBILITY_SETTINGS_NOT_FOUND_DIALOG -> {
viewModel.onCantFindAccessibilitySettings()
Expand All @@ -82,6 +86,8 @@ abstract class BaseMainActivity : AppCompatActivity() {
)
}
}

viewModel.handledActivityLaunchIntent = true
}
}

Expand Down

0 comments on commit de67923

Please sign in to comment.