Browse Source

fix muted VoiceOver after recording voice message (#1750)

Co-authored-by: cyberta <cyberta@riseup.net>
bjoern 2 years ago
parent
commit
f81125ad51
1 changed files with 1 additions and 6 deletions
  1. 1 6
      deltachat-ios/Chat/ChatViewController.swift

+ 1 - 6
deltachat-ios/Chat/ChatViewController.swift

@@ -2178,13 +2178,8 @@ extension ChatViewController: MediaPickerDelegate {
 
     func onVoiceMessageRecorderClosed() {
         if UIAccessibility.isVoiceOverRunning {
+            _ = try? AVAudioSession.sharedInstance().setCategory(.playback)
             UIAccessibility.post(notification: .announcement, argument: nil)
-            // we need to wait a little bit, otherwise the  UIAccessibility notification is ignored and
-            // the first accessibility element on the screen gets selected
-            DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
-                // return to attach button
-                UIAccessibility.post(notification: .screenChanged, argument: self?.messageInputBar.leftStackView.subviews.first)
-            }
         }
     }