Skip to content

Commit

Permalink
Show on App Launch: Fix no option selected on rotation (#5200)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1207908166761516/1208637287651029/f

### Description

Fixes no options being selected then the phone is rotated.

### Steps to test this PR

- [x] Open Show on App Launch screen in settings
- [x] Rotate phone to landscape
- [x] The same option that was selected should still be selected

### Demo

https://github.com/user-attachments/assets/2fabd7ae-15c5-41e6-8b04-c78c13483d71
  • Loading branch information
mikescamell committed Nov 6, 2024
1 parent 8c0a03a commit 700e26c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ShowOnAppLaunchActivity : DuckDuckGoActivity() {

private fun observeViewModel() {
viewModel.viewState
.flowWithLifecycle(lifecycle, Lifecycle.State.STARTED)
.flowWithLifecycle(lifecycle, Lifecycle.State.RESUMED)
.onEach { viewState ->
when (viewState.selectedOption) {
LastOpenedTab -> {
Expand Down

0 comments on commit 700e26c

Please sign in to comment.