mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[Widgets]: Added notes on persistence to reduce memory footprint since we can't have eviction strategy
This commit is contained in:
@@ -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? {
|
||||
|
||||
Reference in New Issue
Block a user