Преглед изворни кода

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

cyberta пре 3 година
родитељ
комит
048e6b44ba
1 измењених фајлова са 6 додато и 0 уклоњено
  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) {
+        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)
     }