Skip to content

Commit

Permalink
Uplift of #5116 (squashed) to release
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Mar 31, 2020
1 parent 61d045d commit 0328775
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class BraveBottomToolbarCoordinator
private SearchAccelerator mSearchAccelerator;
private BottomToolbarNewTabButton mNewTabButton;
private ActivityTabProvider mBraveTabProvider;
private OnClickListener mOriginalHomeButtonListener;

private final Context mContext = ContextUtils.getApplicationContext();

Expand All @@ -50,6 +51,7 @@ public class BraveBottomToolbarCoordinator
super(stub, tabProvider, homeButtonListener, searchAcceleratorListener, shareButtonListener,
tabsSwitcherLongClickListner, themeColorProvider);
mBraveTabProvider = tabProvider;
mOriginalHomeButtonListener = homeButtonListener;
}

@Override
Expand Down Expand Up @@ -99,7 +101,7 @@ void initializeWithNative(OnClickListener tabSwitcherListener,
final OnClickListener homeButtonListener = v -> {
final boolean isHomepageEnabled = HomepageManager.isHomepageEnabled();
if (isHomepageEnabled) {
TabUtils.openHomepage();
mOriginalHomeButtonListener.onClick(v);
} else {
TabUtils.openNewTab();
}
Expand Down

0 comments on commit 0328775

Please sign in to comment.