mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12:53 +00:00
Erase the Top Shelf feed when its login is discarded
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.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user