diff --git a/app/src/common/shared/com/igalia/wolvic/ui/viewmodel/WindowViewModel.java b/app/src/common/shared/com/igalia/wolvic/ui/viewmodel/WindowViewModel.java index d7fa48e6a5..70e38f8b57 100644 --- a/app/src/common/shared/com/igalia/wolvic/ui/viewmodel/WindowViewModel.java +++ b/app/src/common/shared/com/igalia/wolvic/ui/viewmodel/WindowViewModel.java @@ -698,7 +698,7 @@ public MutableLiveData getIsFindInPage() { } public void setIsFindInPage(boolean isFindInPage) { - this.isFindInPage.postValue(new ObservableBoolean(isFindInPage)); + this.isFindInPage.setValue(new ObservableBoolean(isFindInPage)); } @NonNull 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 54751709ae..811af8ffd5 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 @@ -1327,7 +1327,7 @@ public void onSendTab() { @Override public void onFindInPage() { hideMenu(); - mAttachedWindow.hidePanel(); + mAttachedWindow.hideAllPanel(); 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 ca29ff233d..704d053d6e 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 @@ -536,6 +536,10 @@ int getSelectedPanel() { return mLibrary.getSelectedPanelType(); } + public void hideAllPanel() { + hideAllPanel(true); + } + private void hideAllPanel(boolean switchSurface) { if (mViewModel.getIsLibraryVisible().getValue().get()) { hidePanel(switchSurface); @@ -662,6 +666,7 @@ private void showDownloadsPanel(boolean switchSurface) { if (mView == null) { setView(mDownloads, switchSurface); mDownloads.onShow(); + mViewModel.setIsFindInPage(false); mViewModel.setIsDownloadsVisible(true); showPanelCommonAction(); @@ -693,6 +698,7 @@ private void showWebAppsPanel(boolean switchSurface) { if (mView == null) { setView(mWebApps, switchSurface); mWebApps.onShow(); + mViewModel.setIsFindInPage(false); mViewModel.setIsWebAppsVisible(true); showPanelCommonAction(); @@ -724,6 +730,7 @@ private void showAddonsPanel(boolean switchSurface) { if (mView == null) { setView(mAddons, switchSurface); mAddons.onShow(); + mViewModel.setIsFindInPage(false); mViewModel.setIsAddonsVisible(true); showPanelCommonAction();