Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/zen/live-folders/ZenLiveFoldersManager.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,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);
}
}
}

Expand Down