Merge pull request #332 from loki-project/voice-messages
Fix Voice Messages Issue
This commit is contained in:
commit
f3a4a22ed1
|
@ -65,9 +65,9 @@
|
|||
<key>NSContactsUsageDescription</key>
|
||||
<string>Signal uses your contacts to find users you know. We do not store your contacts on the server.</string>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Session's Screen Lock feature uses Face ID.</string>
|
||||
<string>Session's Screen Lock feature uses Face ID.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Session needs access to your microphone to record videos.</string>
|
||||
<string>Session needs access to your microphone to record media.</string>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>Session needs access to your library to save photos.</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
|
|
|
@ -2,7 +2,6 @@ import SessionUtilitiesKit
|
|||
|
||||
@objc(SNJobQueue)
|
||||
public final class JobQueue : NSObject, JobDelegate {
|
||||
private var hasResumedPendingJobs = false // Just for debugging
|
||||
|
||||
@objc public static let shared = JobQueue()
|
||||
|
||||
|
@ -21,12 +20,6 @@ public final class JobQueue : NSObject, JobDelegate {
|
|||
}
|
||||
|
||||
@objc public func resumePendingJobs() {
|
||||
if hasResumedPendingJobs {
|
||||
#if DEBUG
|
||||
preconditionFailure("resumePendingJobs() should only be called once.")
|
||||
#endif
|
||||
}
|
||||
hasResumedPendingJobs = true
|
||||
let allJobTypes: [Job.Type] = [ AttachmentDownloadJob.self, AttachmentUploadJob.self, MessageReceiveJob.self, MessageSendJob.self, NotifyPNServerJob.self ]
|
||||
allJobTypes.forEach { type in
|
||||
let allPendingJobs = SNMessagingKitConfiguration.shared.storage.getAllPendingJobs(of: type)
|
||||
|
|
|
@ -115,6 +115,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
self.delegate.audioPlaybackState = AudioPlaybackState_Playing;
|
||||
|
||||
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil];
|
||||
|
||||
if (!self.audioPlayer) {
|
||||
NSError *error;
|
||||
self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:self.mediaUrl error:&error];
|
||||
|
|
Loading…
Reference in New Issue