move disappearing message jobs to its concurrent queue.

pull/731/head
Ryan ZHAO 3 months ago
parent 262dfdebaa
commit afe08faa4a

@ -118,7 +118,8 @@ extension ContextMenuVC {
subtitleLabel.isHidden = false
subtitleWidthConstraint.isActive = true
let timeToExpireInSeconds: TimeInterval = (expiresStartedAtMs + expiresInSeconds * 1000 - Double(SnodeAPI.currentOffsetTimestampMs())) / 1000
// To prevent a negative timer
let timeToExpireInSeconds: TimeInterval = max(0, (expiresStartedAtMs + expiresInSeconds * 1000 - Double(SnodeAPI.currentOffsetTimestampMs())) / 1000)
subtitleLabel.text = String(format: "DISAPPEARING_MESSAGES_AUTO_DELETES_COUNT_DOWN".localized(), timeToExpireInSeconds.formatted(format: .twoUnits))
timer = Timer.scheduledTimerOnMainThread(withTimeInterval: 1, repeats: true, block: { [weak self] _ in

@ -262,7 +262,8 @@ public final class JobRunner: JobRunnerType {
isTestingJobRunner: isTestingJobRunner,
jobVariants: [
jobVariants.remove(.expirationUpdate),
jobVariants.remove(.getExpiration)
jobVariants.remove(.getExpiration),
jobVariants.remove(.disappearingMessages)
].compactMap { $0 }
),

Loading…
Cancel
Save