2022-11-10 22:41:28 +05:30
|
|
|
import Foundation
|
|
|
|
import SwiftyJSON
|
|
|
|
|
|
|
|
struct CacheModel {
|
|
|
|
static var shared = CacheModel()
|
2022-11-11 16:57:37 +05:30
|
|
|
static let bookmarksGroup = "group.stream.yattee.app.bookmarks"
|
2022-11-10 22:41:28 +05:30
|
|
|
|
2022-11-11 16:57:37 +05:30
|
|
|
let bookmarksDefaults = UserDefaults(suiteName: Self.bookmarksGroup)
|
2022-11-11 02:16:37 +05:30
|
|
|
|
|
|
|
func removeAll() {
|
2022-11-11 16:57:37 +05:30
|
|
|
guard let bookmarksDefaults else { return }
|
|
|
|
bookmarksDefaults.dictionaryRepresentation().keys.forEach(bookmarksDefaults.removeObject(forKey:))
|
2022-11-11 02:16:37 +05:30
|
|
|
}
|
2022-11-10 22:41:28 +05:30
|
|
|
}
|