|
|
@ -425,6 +425,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
|
|
|
|
highlightFocusedMessageIfNeeded()
|
|
|
|
highlightFocusedMessageIfNeeded()
|
|
|
|
didFinishInitialLayout = true
|
|
|
|
didFinishInitialLayout = true
|
|
|
|
markAllAsRead()
|
|
|
|
markAllAsRead()
|
|
|
|
|
|
|
|
recoverInputView()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
|
@ -442,9 +443,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override func appDidBecomeActive(_ notification: Notification) {
|
|
|
|
override func appDidBecomeActive(_ notification: Notification) {
|
|
|
|
// This is a workaround for an issue where the textview is not scrollable
|
|
|
|
recoverInputView()
|
|
|
|
// after the app goes into background and goes back in foreground.
|
|
|
|
|
|
|
|
self.snInputView.text = self.snInputView.text
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
deinit {
|
|
|
|
deinit {
|
|
|
@ -737,6 +736,14 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func recoverInputView() {
|
|
|
|
|
|
|
|
// This is a workaround for an issue where the textview is not scrollable
|
|
|
|
|
|
|
|
// after the app goes into background and goes back in foreground.
|
|
|
|
|
|
|
|
DispatchQueue.main.async {
|
|
|
|
|
|
|
|
self.snInputView.text = self.snInputView.text
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func markAllAsRead() {
|
|
|
|
func markAllAsRead() {
|
|
|
|
guard let lastSortID = viewItems.last?.interaction.sortId else { return }
|
|
|
|
guard let lastSortID = viewItems.last?.interaction.sortId else { return }
|
|
|
|
OWSReadReceiptManager.shared().markAsReadLocally(
|
|
|
|
OWSReadReceiptManager.shared().markAsReadLocally(
|
|
|
|