Fix build errors related to ArticleThemesManager changes.

This commit is contained in:
Brent Simmons 2024-07-06 20:37:30 -07:00
parent 7beb818c67
commit 85d977f4f8
2 changed files with 4 additions and 7 deletions

View File

@ -819,7 +819,7 @@ internal extension AppDelegate {
func importTheme() {
do {
try ArticleThemesManager.shared.importTheme(filePath: filename)
try ArticleThemesManager.shared.importTheme(filename: filename)
confirmImportSuccess(themeName: theme.name)
} catch {
NSApplication.shared.presentError(error)
@ -829,7 +829,7 @@ internal extension AppDelegate {
alert.beginSheetModal(for: window) { result in
if result == NSApplication.ModalResponse.alertFirstButtonReturn {
if ArticleThemesManager.shared.themeExists(filePath: filename) {
if ArticleThemesManager.shared.themeExists(filename: filename) {
let alert = NSAlert()
alert.alertStyle = .warning
@ -922,14 +922,12 @@ internal extension AppDelegate {
@objc func openThemesFolder(_ sender: Any) {
if themeImportPath == nil {
let url = URL(fileURLWithPath: ArticleThemesManager.shared.folderPath)
NSWorkspace.shared.open(url)
NSWorkspace.shared.open(ArticleThemesManager.shared.folderURL)
} else {
let url = URL(fileURLWithPath: themeImportPath!)
NSWorkspace.shared.open(url.deletingLastPathComponent())
}
}
}
/*

View File

@ -47,8 +47,7 @@ final class GeneralPreferencesViewController: NSViewController {
// MARK: - Actions
@IBAction func showThemesFolder(_ sender: Any) {
let url = URL(fileURLWithPath: ArticleThemesManager.shared.folderPath)
NSWorkspace.shared.open(url)
NSWorkspace.shared.open(ArticleThemesManager.shared.folderURL)
}
@IBAction func articleThemePopUpDidChange(_ sender: Any) {