From d8c24b9751b88dedf37061147d89eb801defd6c4 Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Mon, 28 Oct 2024 09:59:42 +0000 Subject: [PATCH] move flow observation to onResume MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit onStarted is too soon to set the checklist item after rotation (also TIL we're not always locked to portrait 😅) --- .../generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt b/app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt index d666c257c284..e9adfa8fca54 100644 --- a/app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt +++ b/app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt @@ -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 -> {