Selaa lähdekoodia

add short comment and fix debugging output

cyberta 2 vuotta sitten
vanhempi
commit
e1daa8b706
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -2451,9 +2451,10 @@ extension ChatViewController: AudioControllerDelegate {
 extension ChatViewController: UITextViewDelegate {
     func textViewShouldEndEditing(_ textView: UITextView) -> Bool {
         if keepKeyboard.get() {
+            // the event is triggered twice on some devices, we're debouncing this
             logger.debug(">>>>> textViewShouldEndEditing - keep keyboard")
             let now = Double(Date().timeIntervalSince1970)
-            logger.debug(">>>> debounce time: \(lastTextViewShouldEndEditingUpdate - now)")
+            logger.debug(">>>> debounce time: \(now - lastTextViewShouldEndEditingUpdate)")
             if now - lastTextViewShouldEndEditingUpdate < 0.5 {
                 return false
             }