2022-11-10 17:11:28 +00:00
|
|
|
import Foundation
|
|
|
|
import SwiftyJSON
|
|
|
|
|
|
|
|
struct CacheModel {
|
|
|
|
static var shared = CacheModel()
|
2022-11-11 11:27:37 +00:00
|
|
|
static let bookmarksGroup = "group.stream.yattee.app.bookmarks"
|
2022-11-10 17:11:28 +00:00
|
|
|
|
2022-11-11 11:27:37 +00:00
|
|
|
let bookmarksDefaults = UserDefaults(suiteName: Self.bookmarksGroup)
|
2022-11-10 20:46:37 +00:00
|
|
|
|
|
|
|
func removeAll() {
|
2022-11-11 11:27:37 +00:00
|
|
|
guard let bookmarksDefaults else { return }
|
|
|
|
bookmarksDefaults.dictionaryRepresentation().keys.forEach(bookmarksDefaults.removeObject(forKey:))
|
2022-11-10 20:46:37 +00:00
|
|
|
}
|
2022-11-10 17:11:28 +00:00
|
|
|
}
|