Fixes 3789 by checking lastPathComponent

This commit is contained in:
Stuart Breckenridge
2023-01-05 07:43:30 +08:00
parent b1a86031fe
commit a2be4cd349

View File

@@ -76,11 +76,13 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging {
}
func presentedSubitemDidChange(at url: URL) {
themeNames = buildThemeNames()
do {
currentTheme = try articleThemeWithThemeName(currentThemeName)
} catch {
appDelegate.presentThemeImportError(error)
if url.lastPathComponent.localizedCaseInsensitiveContains("nnwtheme") {
themeNames = buildThemeNames()
do {
currentTheme = try articleThemeWithThemeName(currentThemeName)
} catch {
appDelegate.presentThemeImportError(error)
}
}
}