Fixes build errors on macOS

This commit is contained in:
Stuart Breckenridge
2023-01-21 22:07:25 +08:00
parent 28cc7be936
commit 63cfbbdd95
2 changed files with 7 additions and 8 deletions

View File

@@ -30,17 +30,17 @@ public enum LocalizedNetNewsWireError: LocalizedError {
public var errorDescription: String? {
switch self {
case .duplicateAccount:
return String(localized: "There is already an account of that type with that username created.", comment: "Error message: duplicate account with same username.")
return NSLocalizedString("There is already an account of that type with that username created.", comment: "Error message: duplicate account with same username.")
case .iCloudDriveMissing:
return String(localized: "Unable to add iCloud Account. Please make sure you have iCloud and iCloud Drive enabled in System Settings.", comment: "Error message: The user cannot enable the iCloud account becasue iCloud or iCloud Drive isn't enabled in Settings.")
return NSLocalizedString("Unable to add iCloud Account. Please make sure you have iCloud and iCloud Drive enabled in System Settings.", comment: "Error message: The user cannot enable the iCloud account becasue iCloud or iCloud Drive isn't enabled in Settings.")
case .userNameAndPasswordRequired:
return String(localized: "Username and password required", comment: "Error message: The user must provide a username and password.")
return NSLocalizedString("Username and password required", comment: "Error message: The user must provide a username and password.")
case .invalidUsernameOrPassword:
return String(localized: "Invalid username or password", comment: "Error message: The user provided an invalid username or password.")
return NSLocalizedString("Invalid username or password", comment: "Error message: The user provided an invalid username or password.")
case .keychainError:
return String(localized: "Keychain error while storing credentials.", comment: "Error message: Unable to save due a Keychain error.")
return NSLocalizedString("Keychain error while storing credentials.", comment: "Error message: Unable to save due a Keychain error.")
case .duplicateDefaultTheme:
return String(localized: "You cannot import a theme that shares the same name as a provided theme.", comment: "Error message: cannot import theme as this is a duplicate of a provided theme.")
return NSLocalizedString("You cannot import a theme that shares the same name as a provided theme.", comment: "Error message: cannot import theme as this is a duplicate of a provided theme.")
}
}
}

View File

@@ -73,8 +73,7 @@ class AccountRefreshTimer {
lastTimedRefresh = Date()
update()
//AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
AccountManager.shared.refreshAll(completion: nil)
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log, completion: nil)
}
}