Bläddra i källkod

don't scroll to bottom on keyboard change event if the chat was just entered. fixes initial scrolling to new messages marker instead of the bottom

cyberta 3 år sedan
förälder
incheckning
9930319406
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -321,12 +321,12 @@ class ChatViewController: UITableViewController {
 
         keyboardManager.on(event: .didChangeFrame) { [weak self] _ in
             guard let self = self else { return }
-            if self.isLastRowVisible() && !self.tableView.isDragging && !self.tableView.isDecelerating && self.highlightedMsg == nil {
+            if self.isLastRowVisible() && !self.tableView.isDragging && !self.tableView.isDecelerating && self.highlightedMsg == nil && !self.isInitial {
                 self.scrollToBottom()
             }
         }.on(event: .willChangeFrame) { [weak self] _ in
             guard let self = self else { return }
-            if self.isLastRowVisible() && !self.tableView.isDragging && !self.tableView.isDecelerating && self.highlightedMsg == nil {
+            if self.isLastRowVisible() && !self.tableView.isDragging && !self.tableView.isDecelerating && self.highlightedMsg == nil  && !self.isInitial {
                 self.scrollToBottom()
             }
         }