Fix account cells using old cache

This commit is contained in:
Shadowfacts 2020-04-27 19:33:36 -04:00
parent 49d00bb1b0
commit 2cba168804
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class AccountTableViewCell: UITableViewCell {
@objc func updateUIForPrefrences() {
avatarImageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadius(for: avatarImageView)
guard let account = mastodonController.cache.account(for: accountID) else {
guard let account = mastodonController.persistentContainer.account(for: accountID) else {
fatalError("Missing cached account \(accountID!)")
}
displayNameLabel.updateForAccountDisplayName(account: account)
@ -42,7 +42,7 @@ class AccountTableViewCell: UITableViewCell {
func updateUI(accountID: String) {
self.accountID = accountID
guard let account = mastodonController.cache.account(for: accountID) else {
guard let account = mastodonController.persistentContainer.account(for: accountID) else {
fatalError("Missing cached account \(accountID)")
}