Skip to content

Commit e221878

Browse files
authored
Fix: Swiping with new UI & bottom bar (#6155)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1210392359930072?focus=true ### Description Fixes an omnibar layout bug with tab swiping when new UI is enabled and the omnibar position is set to bottom. ### Steps to test this PR _Feature 1_ - [ ] - [ ] ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
1 parent 70d9b14 commit e221878

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/src/main/java/com/duckduckgo/app/browser/omnibar/experiments/FadeOmnibarLayout.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,13 @@ class FadeOmnibarLayout @JvmOverloads constructor(
177177
if (w != oldw || h != oldh) {
178178
// This allows the view to adjust to configuration changes, even if it's currently in the focused state.
179179
// We need to do this after the layout pass that triggered onSizeChanged because there appears to be a race condition
180-
// where layout param changes done directly in the onSizeChanged loop are not applied correctly.
181-
doOnLayout {
180+
// where layout param changes done directly in the onSizeChanged loop are not applied correctly (only applies to TOP omnibar position).
181+
if (omnibarPosition == OmnibarPosition.TOP) {
182+
doOnLayout {
183+
unlockContentDimensions()
184+
}
185+
} else {
186+
// For BOTTOM omnibar position, we don't wait to doOnLayout because it breaks the omnibar layout with tab swiping
182187
unlockContentDimensions()
183188
}
184189
}

0 commit comments

Comments
 (0)