From 5dd4bcb48bd92c9baea92e16ae836e17f276bd35 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 29 Aug 2026 19:10:48 +0200 Subject: [PATCH] Spend the deferred purge when its load is discarded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flag stayed set on the path that rejects a stale disk load, where no later load will ever consult it. Nothing stale survives either way — the purge that invalidated the load did the work itself — but a flag left raised is a question for the next reader. --- Yattee/Services/HomeInstanceCache.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Yattee/Services/HomeInstanceCache.swift b/Yattee/Services/HomeInstanceCache.swift index 1dd753e9..48dc0d5e 100644 --- a/Yattee/Services/HomeInstanceCache.swift +++ b/Yattee/Services/HomeInstanceCache.swift @@ -77,6 +77,9 @@ final class HomeInstanceCache { // finds nothing to drop and this would quietly reinstate the // previous login's private feeds. guard generation == accountGeneration else { + // Whatever asked for the purge has already done it — this is + // the only load there will be, so the request is spent too. + pendingFeedPurge = false LoggingService.shared.info( "Discarding a disk cache that belongs to the previous login", category: .general