Skip to content

Commit aee2b4b

Browse files
committed
Add a safety check when the feature gets disabled
1 parent 05ae27f commit aee2b4b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@ open class BrowserActivity : DuckDuckGoActivity() {
346346

347347
super.onCreate(savedInstanceState = newInstanceState, daggerInject = false)
348348

349+
// safety check: if the omnibar type is SPLIT but the feature is disabled, reset to SINGLE_TOP
350+
if (settingsDataStore.omnibarType == OmnibarType.SPLIT && (!browserFeatures.useUnifiedOmnibarLayout().isEnabled() || !browserFeatures.splitOmnibar().isEnabled())) {
351+
settingsDataStore.omnibarType = OmnibarType.SINGLE_TOP
352+
}
353+
349354
bindMockupToolbars()
350355

351356
setContentView(binding.root)

0 commit comments

Comments
 (0)