Change Account initializer so that it is no longer optional. Issue #2400

This commit is contained in:
Maurice Parker 2020-09-07 16:22:21 -05:00
parent 78556238c6
commit 0f2162ff7d
2 changed files with 3 additions and 3 deletions

View File

@ -250,7 +250,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
return delegate.refreshProgress
}
init?(dataFolder: String, type: AccountType, accountID: String, transport: Transport? = nil) {
init(dataFolder: String, type: AccountType, accountID: String, transport: Transport? = nil) {
switch type {
case .onMyMac:
self.delegate = LocalAccountDelegate()

View File

@ -103,7 +103,7 @@ public final class AccountManager: UnreadCountProvider {
abort()
}
defaultAccount = Account(dataFolder: localAccountFolder, type: .onMyMac, accountID: defaultAccountIdentifier)!
defaultAccount = Account(dataFolder: localAccountFolder, type: .onMyMac, accountID: defaultAccountIdentifier)
accountsDictionary[defaultAccount.accountID] = defaultAccount
readAccountsFromDisk()
@ -130,7 +130,7 @@ public final class AccountManager: UnreadCountProvider {
abort()
}
let account = Account(dataFolder: accountFolder, type: type, accountID: accountID)!
let account = Account(dataFolder: accountFolder, type: type, accountID: accountID)
accountsDictionary[accountID] = account
var userInfo = [String: Any]()