mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-22 07:15:41 +00:00
gh-12897: prevent live folder dismissed tabs from reappearing (gh-12876)
This commit is contained in:
@@ -424,13 +424,18 @@ class nsZenLiveFoldersManager {
|
||||
animate: !folder.collapsed,
|
||||
});
|
||||
|
||||
// Remove the dismissed items that are no longer in the given list
|
||||
for (const dismissedItemId of this.dismissedItems) {
|
||||
if (
|
||||
dismissedItemId.startsWith(`${liveFolder.id}:`) &&
|
||||
!itemIds.has(dismissedItemId)
|
||||
) {
|
||||
this.dismissedItems.delete(dismissedItemId);
|
||||
// Remove the dismissed items that are no longer in the given list.
|
||||
// Only do this when the fetch returned results — an empty list may
|
||||
// indicate a transient failure (e.g. auth expired, HTML changed)
|
||||
// and we must not wipe all dismissals in that case.
|
||||
if (itemIds.size > 0) {
|
||||
for (const dismissedItemId of this.dismissedItems) {
|
||||
if (
|
||||
dismissedItemId.startsWith(`${liveFolder.id}:`) &&
|
||||
!itemIds.has(dismissedItemId)
|
||||
) {
|
||||
this.dismissedItems.delete(dismissedItemId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user