Skip to content

Commit 39dc1d0

Browse files
Mugurellplingurar@mozilla.com
authored andcommitted
Bug 1977765 - Show the microsurvey on top of the navbar r=android-reviewers,Roger
For now we're following the same flow as with the bottom toolbar. A bigger refactoring to come later. Differential Revision: https://phabricator.services.mozilla.com/D259087
1 parent c9dde91 commit 39dc1d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,9 +1594,12 @@ abstract class BaseBrowserFragment :
15941594
val isToolbarAtBottom = context.isToolbarAtBottom()
15951595
val browserToolbar = (browserToolbarView as? BrowserToolbarView)?.toolbar
15961596
?: (browserToolbarView as BrowserToolbarComposable).layout
1597+
val navigationBar = browserNavigationBar?.layout
15971598
// The toolbar view has already been added directly to the container.
15981599
if (isToolbarAtBottom) {
15991600
binding.browserLayout.removeView(browserToolbar)
1601+
} else if (navigationBar != null) {
1602+
binding.browserLayout.removeView(navigationBar)
16001603
}
16011604

16021605
_bottomToolbarContainerView = BottomToolbarContainerView(
@@ -1642,6 +1645,8 @@ abstract class BaseBrowserFragment :
16421645

16431646
if (isToolbarAtBottom) {
16441647
AndroidView(factory = { _ -> browserToolbar })
1648+
} else if (navigationBar != null) {
1649+
AndroidView(factory = { _ -> navigationBar })
16451650
}
16461651
}
16471652
}

0 commit comments

Comments
 (0)