Merge pull request #3808 from stuartbreckenridge/fix-3789

Fixes 3789 by checking lastPathComponent
This commit is contained in:
Maurice Parker
2023-02-08 16:52:49 -08:00
committed by GitHub

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)
}
}
}