diff --git a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift index 1aa606b3..bdf4fa33 100644 --- a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift @@ -536,6 +536,21 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti fatalError() } + self.statusState = state + + let reblogStatus: StatusMO? + if let rebloggedStatus = status.reblog { + reblogStatus = status + reblogStatusID = statusID + rebloggerID = status.account.id + + status = rebloggedStatus + } else { + reblogStatus = nil + reblogStatusID = nil + rebloggerID = nil + } + switch filterResult { case .allow: setContentViewMode(.status) @@ -546,6 +561,10 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti attrStr.append(showStr) filteredLabel.attributedText = attrStr setContentViewMode(.filtered) + + // still update id properties, so that info for other methods (e.g., context menus) is correct + self.statusID = status.id + self.accountID = status.account.id return case .hide: fatalError("unreachable") @@ -553,20 +572,11 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti createObservers() - self.statusState = state - var hideTimelineReason = true - if let rebloggedStatus = status.reblog { - reblogStatusID = statusID - rebloggerID = status.account.id - + if let reblogStatus { hideTimelineReason = false - updateRebloggerLabel(reblogger: status.account) - status = rebloggedStatus - } else { - reblogStatusID = nil - rebloggerID = nil + updateRebloggerLabel(reblogger: reblogStatus.account) } if showFollowedHashtags {