Fix inflated new-episodes notification count and rename to "episodes" (issue #60) - #61
Merged
Merged
Conversation
… (issue #60) trimToItemsToKeep deletes evicted rows outright, so a feed whose upstream RSS lists more episodes than itemsToKeep re-"discovers" its own previously-trimmed episodes as new on every single refresh -- each one gets re-inserted, counted as new, then immediately re-evicted again in the same pass. This inflated the notification's count indefinitely instead of settling once new episodes were seen. FeedUpdateResult.Success.newItemCount now excludes items evicted in the same cycle they were "discovered" in, since a Success result already carries both newItemIds and evictedItemIds from the same persist() call. newItemIds itself is untouched, since AutoQueueAndDownloadEnforcer also reads it for auto-queue/auto- download and that's out of scope here. Also renames the notification's wording from "item(s)" to "episode(s)" throughout (title, body, channel name/description) and renames the backing string resources, across all 5 locales. Verified on an emulator: simulated the trim/rediscovery scenario by capping a subscribed feed to 5 items via Feed Properties, forcing a refresh, and confirming no notification fired despite ~15 historical episodes being reinserted-then-evicted in that pass (previously this would have shown "~15 new items"). Then deleted one genuinely-kept episode and re-ran: notification correctly read "New episodes" / "1 new episode".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #60
Test plan