From a2ad0e134f2984fa50b58a7c4fb930fdf5afa5dc Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 3 Sep 2019 19:34:48 +0200 Subject: [PATCH] Update bookmarks tray button state after dismissing the notification (#1740) --- .../org/mozilla/vrbrowser/ui/widgets/TrayWidget.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java index 66ddbb889..4e0a55885 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/TrayWidget.java @@ -280,7 +280,7 @@ public void show(@ShowFlags int aShowFlags) { @Override public void hide(@HideFlags int aHideFlags) { - ThreadUtils.postToUiThread(hideBookmarkNotification); + hideBookmarkNotification.run(); if (mWidgetPlacement.visible) { mWidgetPlacement.visible = false; @@ -294,7 +294,7 @@ public void hide(@HideFlags int aHideFlags) { @Override public void detachFromWindow() { - ThreadUtils.postToUiThread(hideBookmarkNotification); + hideBookmarkNotification.run(); if (mSessionStack != null) { mSessionStack.removeSessionChangeListener(this); @@ -503,8 +503,9 @@ public void run() { public void run() { if (mLibraryNotification != null) { mLibraryNotification.hide(UIWidget.REMOVE_WIDGET); + mLibraryNotification = null; + mBookmarksButton.setNotificationMode(false); } - mBookmarksButton.setNotificationMode(false); } };