Fix update timestamp work item firing too frequently
A reconfiguration would schedule a new work item without cancelling the old one, resulting in the timestamp updating multiple times in quick succession (noticeable for statuses <60s old).
This commit is contained in:
parent
3ab82b2dbb
commit
fd6a4ba41c
|
@ -410,6 +410,9 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
|
|||
}
|
||||
|
||||
private func doUpdateTimestamp(status: StatusMO) {
|
||||
// if there's a pending update timestamp work item, cancel it
|
||||
updateTimestampWorkItem?.cancel()
|
||||
|
||||
timestampLabel.text = status.createdAt.timeAgoString()
|
||||
|
||||
let delay: DispatchTimeInterval?
|
||||
|
|
Loading…
Reference in New Issue