Skip to content

Commit a863754

Browse files
committed
Throw an exception if split omnibar selected for SingleOmnibarLayout
1 parent 50f9f49 commit a863754

File tree

1 file changed

+2
-1
lines changed
  • app/src/main/java/com/duckduckgo/app/browser/omnibar

1 file changed

+2
-1
lines changed

app/src/main/java/com/duckduckgo/app/browser/omnibar/Omnibar.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class Omnibar(
165165
binding.rootView.removeView(binding.omnibarLayoutBottom)
166166

167167
return when (omnibarType) {
168-
OmnibarType.SINGLE_TOP, OmnibarType.SPLIT -> {
168+
OmnibarType.SINGLE_TOP -> {
169169
binding.rootView.removeView(binding.singleOmnibarLayoutBottom)
170170
binding.singleOmnibarLayoutTop
171171
}
@@ -175,6 +175,7 @@ class Omnibar(
175175
adjustCoordinatorLayoutBehaviorForBottomOmnibar()
176176
binding.singleOmnibarLayoutBottom
177177
}
178+
else -> throw IllegalStateException("Invalid omnibar type for single omnibar setup: $omnibarType")
178179
}
179180
}
180181

0 commit comments

Comments
 (0)