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 authored Oct 28, 2024
1 parent 2f6c093 commit a51844e
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 a51844e

Please sign in to comment.