Skip to content

Commit

Permalink
Stop having findInPage and Panel opened at same time
Browse files Browse the repository at this point in the history
Extend the commit
a23e2cf
here

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
  • Loading branch information
HollowMan6 committed Sep 12, 2023
1 parent 61bc7a3 commit d28ea88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ public void onSendTab() {
@Override
public void onFindInPage() {
hideMenu();
mAttachedWindow.hidePanel();
mAttachedWindow.hideAllPanel();

mViewModel.setIsFindInPage(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ int getSelectedPanel() {
return mLibrary.getSelectedPanelType();
}

public void hideAllPanel() {
hideAllPanel(true);
}

private void hideAllPanel(boolean switchSurface) {
if (mViewModel.getIsLibraryVisible().getValue().get()) {
hidePanel(switchSurface);
Expand Down Expand Up @@ -663,6 +667,7 @@ private void showDownloadsPanel(boolean switchSurface) {
if (mView == null) {
setView(mDownloads, switchSurface);
mDownloads.onShow();
mViewModel.setIsFindInPage(false);
mViewModel.setIsDownloadsVisible(true);
showPanelCommonAction();

Expand Down Expand Up @@ -694,6 +699,7 @@ private void showWebAppsPanel(boolean switchSurface) {
if (mView == null) {
setView(mWebApps, switchSurface);
mWebApps.onShow();
mViewModel.setIsFindInPage(false);
mViewModel.setIsWebAppsVisible(true);
showPanelCommonAction();

Expand Down Expand Up @@ -725,6 +731,7 @@ private void showAddonsPanel(boolean switchSurface) {
if (mView == null) {
setView(mAddons, switchSurface);
mAddons.onShow();
mViewModel.setIsFindInPage(false);
mViewModel.setIsAddonsVisible(true);
showPanelCommonAction();

Expand Down

0 comments on commit d28ea88

Please sign in to comment.