[fenix] For https://github.com/mozilla-mobile/fenix/issues/15116: Use safe cast for layout params.

pull/600/head
mcarare 4 years ago committed by ekager
parent e90ddb1f38
commit 55e2cfe526

@ -210,7 +210,7 @@ class BrowserToolbarView(
fun expand() {
when (settings.toolbarPosition) {
ToolbarPosition.BOTTOM -> {
(view.layoutParams as CoordinatorLayout.LayoutParams).apply {
(view.layoutParams as? CoordinatorLayout.LayoutParams)?.apply {
// behavior can be null if the "Scroll to hide toolbar" setting is toggled off.
(behavior as? BrowserToolbarBottomBehavior)?.forceExpand(view)
}

Loading…
Cancel
Save