From 7049cbc90de2a8626b43e30834cdd56b9889b47d Mon Sep 17 00:00:00 2001 From: Songlin Jiang Date: Wed, 6 Sep 2023 00:11:46 +0200 Subject: [PATCH] Stop having findInPage and Panel opened at same time 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 https://github.com/Igalia/wolvic/pull/881 once this is merged Signed-off-by: Songlin Jiang --- .../shared/com/igalia/wolvic/ui/widgets/NavigationBarWidget.java | 1 + .../common/shared/com/igalia/wolvic/ui/widgets/WindowWidget.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/common/shared/com/igalia/wolvic/ui/widgets/NavigationBarWidget.java b/app/src/common/shared/com/igalia/wolvic/ui/widgets/NavigationBarWidget.java index 0ff2d5445b..f947f0d2a0 100644 --- a/app/src/common/shared/com/igalia/wolvic/ui/widgets/NavigationBarWidget.java +++ b/app/src/common/shared/com/igalia/wolvic/ui/widgets/NavigationBarWidget.java @@ -1285,6 +1285,7 @@ public void onSendTab() { @Override public void onFindInPage() { hideMenu(); + mAttachedWindow.hidePanel(); mViewModel.setIsFindInPage(true); } diff --git a/app/src/common/shared/com/igalia/wolvic/ui/widgets/WindowWidget.java b/app/src/common/shared/com/igalia/wolvic/ui/widgets/WindowWidget.java index 81d1eac5b9..00f119d0cc 100644 --- a/app/src/common/shared/com/igalia/wolvic/ui/widgets/WindowWidget.java +++ b/app/src/common/shared/com/igalia/wolvic/ui/widgets/WindowWidget.java @@ -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;