gh-14766: prevent space routing toast for tabs routed to current space (gh-14504)

This commit is contained in:
Ashvin Jangid
2026-07-28 23:35:10 +05:30
committed by GitHub
parent 95df1b3a9d
commit 346aa1ff9a

View File

@@ -977,6 +977,14 @@ window.gZenCompactModeManager = {
!gZenGlanceManager._animating &&
!this._nextTimeWillBeActive
) {
const isTabRoutedToCurrentSpace =
beforeRouteResult.targetRoute === gZenWorkspaces.activeWorkspace;
// Do not show the toast if the sidebar is not hidden and
// the tab is being routed to the current space
if (!isSidebarHidden && isTabRoutedToCurrentSpace) {
return;
}
let messageId = "zen-background-tab-opened-toast";
let toastOptions = {
button: {
@@ -988,7 +996,7 @@ window.gZenCompactModeManager = {
},
};
if (beforeRouteResult.isRouteFound) {
if (beforeRouteResult.isRouteFound && !isTabRoutedToCurrentSpace) {
messageId = "zen-space-routing-tab-routed-toast";
toastOptions = {
l10nArgs: { targetWorkspace: beforeRouteResult.targetWorkspaceName },