Handle low memory notification.

This commit is contained in:
Brent Simmons committed 2026-03-07 17:03:18 -08:00
1 parent 737300bb0c
commit d3537fd3e2
1 file changed
+5
+5
View File
@@ -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? {