Explorar o código

Re-focus on attach button in voice over mode, after user recorded a voice message. Re-enables speech as well

cyberta %!s(int64=3) %!d(string=hai) anos
pai
achega
048e6b44ba
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -1832,6 +1832,12 @@ extension ChatViewController: MediaPickerDelegate {
     }
     }
 
 
     func onVoiceMessageRecorded(url: NSURL) {
     func onVoiceMessageRecorded(url: NSURL) {
+        if UIAccessibility.isVoiceOverRunning {
+            DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
+                //return to attach button
+                UIAccessibility.post(notification: .screenChanged, argument: self?.messageInputBar.leftStackView.subviews.first)
+            }
+        }
         sendVoiceMessage(url: url)
         sendVoiceMessage(url: url)
     }
     }