浏览代码

improve device rotation behavior at the bottom of a chat

cyberta 4 年之前
父节点
当前提交
4de4c185aa
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      deltachat-ios/Chat/ChatViewController.swift

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

@@ -306,14 +306,17 @@ class ChatViewController: UITableViewController {
                 if self.showCustomNavBar {
                     self.navigationItem.setRightBarButton(self.badgeItem, animated: true)
                 }
+                if lastSectionVisibleBeforeTransition {
+                    self.scrollToBottom(animated: false)
+                }
             },
             completion: {[weak self] _ in
                 guard let self = self else { return }
                 self.updateTitle(chat: self.dcContext.getChat(chatId: self.chatId))
                 if lastSectionVisibleBeforeTransition {
                     DispatchQueue.main.async { [weak self] in
-                        self?.scrollToBottom(animated: true)
                         self?.tableView.reloadData()
+                        self?.scrollToBottom(animated: false)
                     }
                 }
             }