diff --git a/Tusker/Views/Status/StatusTableViewCell.swift b/Tusker/Views/Status/StatusTableViewCell.swift index fcec8fe175..a62f53725c 100644 --- a/Tusker/Views/Status/StatusTableViewCell.swift +++ b/Tusker/Views/Status/StatusTableViewCell.swift @@ -112,10 +112,7 @@ class StatusTableViewCell: UITableViewCell { rebloggerAccountUpdater = MastodonCache.accountSubject .filter { $0.id == self.rebloggerID } .receive(on: DispatchQueue.main) - .sink(receiveValue: { (_) in - // this method is responsible for setting the reblog label text - self.updateUIForPreferences() - }) + .sink(receiveValue: updateRebloggerLabel(reblogger:)) } func updateUI(statusID: String) { @@ -194,11 +191,15 @@ class StatusTableViewCell: UITableViewCell { avatarImageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadius(for: avatarImageView) if let rebloggerID = rebloggerID, let reblogger = MastodonCache.account(for: rebloggerID) { - reblogLabel.text = "Reblogged by \(reblogger.realDisplayName)" + updateRebloggerLabel(reblogger: reblogger) } displayNameLabel.text = account.realDisplayName } + func updateRebloggerLabel(reblogger: Account) { + reblogLabel.text = "Reblogged by \(reblogger.realDisplayName)" + } + func updateTimestamp() { guard let status = MastodonCache.status(for: statusID) else { fatalError("Missing cached status \(statusID!)") }