From e9393ba315116d1cf72a554e72c71c0b7a4bc0a0 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Thu, 7 Nov 2019 18:09:19 +0100 Subject: [PATCH] Hide bookmarks/history when selecting a different tab --- .../org/mozilla/vrbrowser/ui/widgets/WindowWidget.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java index 8844a7fde..96af24cfe 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java @@ -483,6 +483,14 @@ public void switchHistory() { } } + private void hideLibraryPanels() { + if (isBookmarksVisible()) { + hideBookmarks(); + } else if (isHistoryVisible()) { + hideHistory(); + } + } + public void showHistory() { showHistory(true); } @@ -1035,6 +1043,7 @@ public void setSession(@NonNull Session aSession) { listener.onSessionChanged(oldSession, aSession); } } + hideLibraryPanels(); } public void releaseDisplay(GeckoSession aSession) {