From 5295dd5e8606a2a28dbdddfa7869d484727bbfe6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 29 Aug 2026 23:51:38 +0200 Subject: [PATCH] Erase the Top Shelf feed when its login is discarded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The snapshot is written to the shared app group and read by tvOS with the app not running, so clearing the cache in memory and on disk left the previous login's feed sitting on the system home screen. Nothing rewrote it: only a successful refresh and app launch ever did, so it survived until whichever came first — and if nobody refreshed under the new login, indefinitely. Written from the cleared cache, which is what erases it. --- Yattee/Services/SubscriptionFeedCache.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Yattee/Services/SubscriptionFeedCache.swift b/Yattee/Services/SubscriptionFeedCache.swift index d6b1899a..d819313e 100644 --- a/Yattee/Services/SubscriptionFeedCache.swift +++ b/Yattee/Services/SubscriptionFeedCache.swift @@ -170,6 +170,12 @@ final class SubscriptionFeedCache { lastUpdated = nil hasMorePages = false currentPage = 1 + // The Top Shelf snapshot lives in the shared app group and is read by + // tvOS without the app running, so emptying the cache is not enough: + // the previous login's feed would stay on the system home screen until + // some later refresh happened to rewrite it. Written from the cleared + // cache, so this erases it. + TopShelfSnapshotWriter.writeFeed() diskClearTask = Task { await FeedCache.shared.clear() }