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
We shouldn't let user feel that we can search content
in the library page through findInPage. So we close
findInPage when we open the Library, and we close the
panel when we open findInPage in the hamburger menu.

We shall pay attention to this as well in
#881
once this is merged

Signed-off-by: Songlin Jiang <[email protected]>
  • Loading branch information
HollowMan6 committed Sep 5, 2023
1 parent 118ba3f commit a23e2cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,7 @@ public void onSendTab() {
@Override
public void onFindInPage() {
hideMenu();
mAttachedWindow.hidePanel();

mViewModel.setIsFindInPage(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ private void showPanel(@Windows.PanelType int panelType, boolean switchSurface)
setView(mLibrary, switchSurface);
mLibrary.selectPanel(panelType);
mLibrary.onShow();
mViewModel.setIsFindInPage(false);
mViewModel.setIsPanelVisible(true);
if (mRestoreFirstPaint == null && !isFirstPaintReady() && (mFirstDrawCallback != null) && (mSurface != null)) {
final Runnable firstDrawCallback = mFirstDrawCallback;
Expand Down

0 comments on commit a23e2cf

Please sign in to comment.