From 6ed5acdb40024d4725db9a50db043d6dc3c7f3ab Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:36:52 +0530 Subject: [PATCH] [Widgets]: Added notes on persistence to reduce memory footprint since we can't have eviction strategy --- AltWidget/Manager/PageInfoManager.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AltWidget/Manager/PageInfoManager.swift b/AltWidget/Manager/PageInfoManager.swift index 1c629d35..791a3585 100644 --- a/AltWidget/Manager/PageInfoManager.swift +++ b/AltWidget/Manager/PageInfoManager.swift @@ -22,12 +22,15 @@ class PageInfoManager { func setPageInfo(forWidgetKind kind: String, forWidgetID id: Int, value: NavigationEvent?) { let key = getKey(forWidgetKind: kind, forWidgetID: id) +// UserDefaults.standard.set(value, forKey: key) pageInfoMap[key] = value } func getPageInfo(forWidgetKind kind: String, forWidgetID id: Int) -> NavigationEvent? { let key = getKey(forWidgetKind: kind, forWidgetID: id) +// return UserDefaults.standard.value(forKey: key) return pageInfoMap[key] + } func popPageInfo(forWidgetKind kind: String, forWidgetID id: Int) -> NavigationEvent? {