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,7 +81,9 @@ public enum PushRegistrationError: Error {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
vanillaTokenResolver(Result.success(tokenData))
|
DispatchQueue.global(qos: .default).async {
|
||||||
|
vanillaTokenResolver(Result.success(tokenData))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vanilla push token is obtained from the system via AppDelegate
|
// Vanilla push token is obtained from the system via AppDelegate
|
||||||
|
@ -92,7 +94,9 @@ public enum PushRegistrationError: Error {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
vanillaTokenResolver(Result.failure(error))
|
DispatchQueue.global(qos: .default).async {
|
||||||
|
vanillaTokenResolver(Result.failure(error))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: helpers
|
// MARK: helpers
|
||||||
|
|
|
@ -681,26 +681,6 @@ public final class JobRunner: JobRunnerType {
|
||||||
|
|
||||||
queues.wrappedValue[job.variant]?.removePendingJob(jobId)
|
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
|
// MARK: - Convenience
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue