Add the ability to delete a theme on iOS

This commit is contained in:
Maurice Parker
2021-09-12 16:40:59 -05:00
parent 04ff96c60a
commit 35b913f4a0
2 changed files with 49 additions and 0 deletions

View File

@@ -105,6 +105,12 @@ final class ArticleThemesManager: NSObject, NSFilePresenter {
writeInstalledStyleSheets(installedStyleSheets)
}
func deleteTheme(themeName: String) {
if let filename = pathForThemeName(themeName, folder: folderPath) {
try? FileManager.default.removeItem(atPath: filename)
}
}
}
// MARK : Private