From fda9a60a2e31b59bce1a6c7dcbdd06b0e69ac1eb Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Thu, 10 Aug 2023 16:46:16 +1000 Subject: [PATCH] remove the logic that is not as expected --- .../Jobs/Types/ConfigurationSyncJob.swift | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift b/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift index 2337fa087..2aaa246bf 100644 --- a/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift +++ b/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift @@ -52,28 +52,6 @@ public enum ConfigurationSyncJob: JobExecutor { return deferred(updatedJob ?? job, dependencies) } - // TODO: This logic needs to be fixed up (the current behaviour will not behave as expected) -// // We want to update lastReadTimestamp after the disappearing messages are updated to the network, so on -// // linked devices the expiration time can be the same and avoid race condition -// guard -// dependencies.jobRunner -// .jobInfoFor(variant: .expirationUpdate) -// .filter({ _, info in -// info.threadId == job.threadId // Exclude expiration update jobs for different threads -// }) -// .isEmpty -// else { -// // Defer the job to run 'maxRunFrequency' -// let updatedJob: Job? = dependencies.storage.write(using: dependencies) { db in -// try job -// .with(nextRunTimestamp: Date().timeIntervalSince1970 + waitTimeForExpirationUpdate) -// .saved(db) -// } -// -// SNLog("[ConfigurationSyncJob] For \(job.threadId ?? "UnknownId") deferred due to expiration update jobs running.") -// return deferred(updatedJob ?? job, dependencies) -// } - // If we don't have a userKeyPair yet then there is no need to sync the configuration // as the user doesn't exist yet (this will get triggered on the first launch of a // fresh install due to the migrations getting run)