Fixed a crash due to an assertion for encryption on the main thread
Removed some commented out code
This commit is contained in:
parent
87668d86a1
commit
1a383ea850
|
@ -81,8 +81,10 @@ public enum PushRegistrationError: Error {
|
|||
return
|
||||
}
|
||||
|
||||
DispatchQueue.global(qos: .default).async {
|
||||
vanillaTokenResolver(Result.success(tokenData))
|
||||
}
|
||||
}
|
||||
|
||||
// Vanilla push token is obtained from the system via AppDelegate
|
||||
@objc
|
||||
|
@ -92,8 +94,10 @@ public enum PushRegistrationError: Error {
|
|||
return
|
||||
}
|
||||
|
||||
DispatchQueue.global(qos: .default).async {
|
||||
vanillaTokenResolver(Result.failure(error))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: helpers
|
||||
|
||||
|
|
|
@ -682,26 +682,6 @@ public final class JobRunner: JobRunnerType {
|
|||
queues.wrappedValue[job.variant]?.removePendingJob(jobId)
|
||||
}
|
||||
|
||||
//public static func hasPendingOrRunningJob<T: Encodable>(
|
||||
// with variant: Job.Variant,
|
||||
// threadId: String? = nil,
|
||||
// interactionId: Int64? = nil,
|
||||
// details: T? = nil
|
||||
//) -> Bool {
|
||||
// guard let targetQueue: JobQueue = queues.wrappedValue[variant] else { return false }
|
||||
//
|
||||
// // Ensure we can encode the details (if provided)
|
||||
// let detailsData: Data? = details.map { try? JSONEncoder().encode($0) }
|
||||
//
|
||||
// guard details == nil || detailsData != nil else { return false }
|
||||
//
|
||||
// return targetQueue.hasPendingOrRunningJobWith(
|
||||
// threadId: threadId,
|
||||
// interactionId: interactionId,
|
||||
// detailsData: detailsData
|
||||
// )
|
||||
//}
|
||||
|
||||
// MARK: - Convenience
|
||||
|
||||
fileprivate static func getRetryInterval(for job: Job) -> TimeInterval {
|
||||
|
|
Loading…
Reference in New Issue