From d3537fd3e2d091d29ee109b7ecf5bda2d57994da Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 7 Mar 2026 17:03:18 -0800 Subject: [PATCH] Handle low memory notification. --- Shared/Images/FeedIconDownloader.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Shared/Images/FeedIconDownloader.swift b/Shared/Images/FeedIconDownloader.swift index e519155a6..a95517e70 100644 --- a/Shared/Images/FeedIconDownloader.swift +++ b/Shared/Images/FeedIconDownloader.swift @@ -42,6 +42,11 @@ extension Notification.Name { loadFeedURLToIconURLCache() NotificationCenter.default.addObserver(self, selector: #selector(imageDidBecomeAvailable(_:)), name: .imageDidBecomeAvailable, object: imageDownloader) + NotificationCenter.default.addObserver(self, selector: #selector(handleLowMemory(_:)), name: .lowMemory, object: nil) + } + + @objc func handleLowMemory(_ notification: Notification) { + cache.removeAll() } func icon(for feed: Feed) -> IconImage? {