gh-12897: prevent live folder dismissed tabs from reappearing (gh-12876)

This commit is contained in:
Eugen Istoc
2026-03-23 19:48:55 -04:00
committed by GitHub
parent 53d1ba45f6
commit 5493ab7c87

View File

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