File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/src/main/java/com/duckduckgo/app/browser/customtabs Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import com.duckduckgo.common.ui.DuckDuckGoActivity
3535import com.duckduckgo.common.ui.viewbinding.viewBinding
3636import com.duckduckgo.di.scopes.ActivityScope
3737import java.util.UUID
38+ import kotlinx.coroutines.flow.distinctUntilChanged
3839import kotlinx.coroutines.flow.launchIn
3940import kotlinx.coroutines.flow.onEach
4041import timber.log.Timber
@@ -55,9 +56,11 @@ class CustomTabActivity : DuckDuckGoActivity() {
5556
5657 Timber .d(" onCreate called with url=$url and toolbar color=$toolbarColor " )
5758
58- viewModel.viewState.flowWithLifecycle(lifecycle, Lifecycle .State .CREATED ).onEach {
59- renderView(it)
60- }.launchIn(lifecycleScope)
59+ viewModel.viewState.flowWithLifecycle(lifecycle, Lifecycle .State .STARTED )
60+ .distinctUntilChanged()
61+ .onEach {
62+ renderView(it)
63+ }.launchIn(lifecycleScope)
6164
6265 viewModel.onCustomTabCreated(url, toolbarColor)
6366
You can’t perform that action at this time.
0 commit comments