Skip to content

Commit

Permalink
Only going back to new tab when there's no web page to go back
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Dec 3, 2024
1 parent beea487 commit f5b12a5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,10 @@ private void updateUI() {
mBinding.navigationBarNavigation.backButton.setOnClickListener(v -> {
v.requestFocusFromTouch();

if (mViewModel.getBackToNewTabEnabled().getValue().get()) {
mAttachedWindow.showNewTab();
}

if (getSession().canGoBack()) {
getSession().goBack();
} else if (mViewModel.getBackToNewTabEnabled().getValue().get()) {
mAttachedWindow.showNewTab();
}

if (mAudio != null) {
Expand Down

0 comments on commit f5b12a5

Please sign in to comment.