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); } };