mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
Handle low memory notification.
This commit is contained in:
1 parent
737300bb0c
commit
d3537fd3e2
1 file changed
+5
@@ -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? {
|
||||
|
||||
Reference in new issue
Block a user