diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/BookmarksView.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/BookmarksView.java index bf63830eb..f27834623 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/BookmarksView.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/BookmarksView.java @@ -230,6 +230,8 @@ public void onFxALogin(@NonNull View view) { WidgetManagerDelegate widgetManager = ((VRBrowserActivity) getContext()); widgetManager.openNewTabForeground(url); widgetManager.getFocusedWindow().getSession().setUaMode(GeckoSessionSettings.USER_AGENT_MODE_MOBILE); + + mBookmarksViewListeners.forEach((listener) -> listener.onFxALogin(view)); } }, mUIThreadExecutor).exceptionally(throwable -> { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HistoryView.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HistoryView.java index 6ddba5141..0f28e4971 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HistoryView.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HistoryView.java @@ -227,6 +227,8 @@ public void onFxALogin(@NonNull View view) { WidgetManagerDelegate widgetManager = ((VRBrowserActivity) getContext()); widgetManager.openNewTabForeground(url); widgetManager.getFocusedWindow().getSession().setUaMode(GeckoSessionSettings.USER_AGENT_MODE_MOBILE); + + mHistoryViewListeners.forEach((listener) -> listener.onFxALogin(view)); } }, mUIThreadExecutor).exceptionally(throwable -> { 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 9746e9a5b..f16dc83b3 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 @@ -1428,6 +1428,11 @@ public void onHideContextMenu(@NonNull View view) { public void onItemClicked(@NonNull View view, Bookmark item) { hideBookmarks(); } + + @Override + public void onFxALogin(@NonNull View view) { + hideBookmarks(); + } }; private HistoryCallback mHistoryListener = new HistoryCallback() { @@ -1462,6 +1467,11 @@ public void onHideContextMenu(@NonNull View view) { public void onItemClicked(@NonNull View view, VisitInfo item) { hideHistory(); } + + @Override + public void onFxALogin(@NonNull View view) { + hideHistory(); + } }; private void hideContextMenus() { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/WhatsNewWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/WhatsNewWidget.java index de3d73dab..e5ca78620 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/WhatsNewWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/WhatsNewWidget.java @@ -104,6 +104,8 @@ private void signIn(View view) { mAccounts.logoutAsync(); } else { + hide(REMOVE_WIDGET); + CompletableFuture result = mAccounts.authUrlAsync(); if (result != null) { result.thenAcceptAsync((url) -> { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/SettingsWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/SettingsWidget.java index e07d8ac48..6894c04f4 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/SettingsWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/SettingsWidget.java @@ -281,11 +281,12 @@ private void manageAccount() { switch(mAccounts.getAccountStatus()) { case SIGNED_OUT: case NEEDS_RECONNECT: - hide(REMOVE_WIDGET); if (mAccounts.getAccountStatus() == Accounts.AccountStatus.SIGNED_IN) { mAccounts.logoutAsync(); } else { + hide(REMOVE_WIDGET); + CompletableFuture result = mAccounts.authUrlAsync(); if (result != null) { result.thenAcceptAsync((url) -> {