mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-31 20:28:54 +00:00
gh-14766: prevent space routing toast for tabs routed to current space (gh-14504)
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user