[Android] Fix for custom tab menu position (#29697)
This commit is contained in:
@@ -1519,7 +1519,8 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
|
||||
|
||||
BraveMenuButtonCoordinator.setMenuFromBottom(
|
||||
isMenuButtonOnBottomControls()
|
||||
|| BottomToolbarConfiguration.isToolbarBottomAnchored());
|
||||
|| isToolbarPhone()
|
||||
&& BottomToolbarConfiguration.isToolbarBottomAnchored());
|
||||
}
|
||||
|
||||
public void updateWalletBadgeVisibility(boolean visible) {
|
||||
@@ -1528,10 +1529,12 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
|
||||
}
|
||||
|
||||
public void updateMenuButtonState() {
|
||||
// No need to change the state if bottom controls are not enabled.
|
||||
if (!BottomToolbarConfiguration.isBraveBottomControlsEnabled()) return;
|
||||
|
||||
BraveMenuButtonCoordinator.setMenuFromBottom(mIsBottomControlsVisible);
|
||||
if (BottomToolbarConfiguration.isBraveBottomControlsEnabled()) {
|
||||
BraveMenuButtonCoordinator.setMenuFromBottom(mIsBottomControlsVisible);
|
||||
} else {
|
||||
BraveMenuButtonCoordinator.setMenuFromBottom(
|
||||
isToolbarPhone() && BottomToolbarConfiguration.isToolbarBottomAnchored());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1589,4 +1592,8 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isToolbarPhone() {
|
||||
return BraveReflectionUtil.equalTypes(this.getClass(), ToolbarPhone.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user