Change Account initializer so that it is no longer optional. Issue #2400
This commit is contained in:
parent
78556238c6
commit
0f2162ff7d
|
@ -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()
|
||||
|
|
|
@ -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]()
|
||||
|
|
Loading…
Reference in New Issue