mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 13:50:32 +05:30
17 lines
443 B
Swift
17 lines
443 B
Swift
import Defaults
|
|
import SwiftyJSON
|
|
|
|
final class RecentlyOpenedExporter: SettingsGroupExporter {
|
|
override var globalJSON: JSON {
|
|
[
|
|
"recentlyOpened": Defaults[.recentlyOpened].compactMap { recentItemJSON($0) }
|
|
]
|
|
}
|
|
|
|
private func recentItemJSON(_ recentItem: RecentItem) -> JSON {
|
|
var json = JSON()
|
|
json.dictionaryObject = RecentItemBridge().serialize(recentItem)
|
|
return json
|
|
}
|
|
}
|