Integrate tag overview into settings file
This commit is contained in:
@ -13,6 +13,8 @@ struct SettingsFile {
|
||||
|
||||
let audioPlayer: AudioPlayerSettingsFile
|
||||
|
||||
let tagOverview: TagOverviewFile?
|
||||
|
||||
let german: LocalizedPostSettingsFile
|
||||
|
||||
let english: LocalizedPostSettingsFile
|
||||
@ -29,6 +31,7 @@ extension SettingsFile {
|
||||
posts: .default,
|
||||
pages: .default,
|
||||
audioPlayer: AudioPlayerSettings.default.file,
|
||||
tagOverview: nil,
|
||||
german: .default,
|
||||
english: .default
|
||||
)
|
||||
|
@ -34,8 +34,6 @@ final class Storage: ObservableObject {
|
||||
|
||||
private let settingsDataFileName = "settings.json"
|
||||
|
||||
private let tagOverviewFileName = "tag-overview.json"
|
||||
|
||||
private let contentPathBookmarkKey = "contentPathBookmark"
|
||||
|
||||
// MARK: Properties
|
||||
@ -227,17 +225,6 @@ final class Storage: ObservableObject {
|
||||
return contentScope.encode(fileDescriptions, to: fileDescriptionFilename)
|
||||
}
|
||||
|
||||
// MARK: Tag overview
|
||||
|
||||
func loadTagOverview() -> TagOverviewFile? {
|
||||
contentScope?.decode(at: tagOverviewFileName)
|
||||
}
|
||||
|
||||
func save(tagOverview: TagOverviewFile?) -> Bool {
|
||||
guard let contentScope else { return false }
|
||||
return contentScope.encode(tagOverview, to: tagOverviewFileName)
|
||||
}
|
||||
|
||||
// MARK: Files
|
||||
|
||||
func size(of file: String) -> Int? {
|
||||
|
Reference in New Issue
Block a user