Skip to content

Commit 553708f

Browse files
authored
Merge pull request #493 from Adamant-im/dev/trello.com/c/hZe2WhpT
[trello.com/c/hZe2WhpT] Fixed: Dialog screen lag when quoting
2 parents d927ac3 + 1832752 commit 553708f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Adamant/Modules/Chat/View/ChatViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,9 @@ private extension ChatViewController {
659659
animations: {
660660
self.messageInputBar.topStackView.addArrangedSubview(self.replyView)
661661
})
662-
messageInputBar.inputTextView.becomeFirstResponder()
662+
if viewAppeared {
663+
messageInputBar.inputTextView.becomeFirstResponder()
664+
}
663665
}
664666

665667
replyView.update(with: message)

Adamant/Modules/Chat/ViewModel/ChatViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ final class ChatViewModel: NSObject {
191191
}
192192

193193
func presentKeyboardOnStartIfNeeded() {
194-
guard !inputText.isEmpty && replyMessage == nil else { return }
194+
guard !inputText.isEmpty || replyMessage != nil else { return }
195195
presentKeyboard.send()
196196
}
197197

0 commit comments

Comments
 (0)