diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index 886352a59..e75f42eec 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -441,6 +441,12 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat mediaCache.removeAllObjects() } + override func appDidBecomeActive(_ notification: Notification) { + // This is a workaround for an issue where the textview is not scrollable + // after the app goes into background and goes back in foreground. + self.snInputView.text = self.snInputView.text + } + deinit { NotificationCenter.default.removeObserver(self) } diff --git a/Session/Shared/BaseVC.swift b/Session/Shared/BaseVC.swift index 0bccafb10..f646a79c4 100644 --- a/Session/Shared/BaseVC.swift +++ b/Session/Shared/BaseVC.swift @@ -25,6 +25,7 @@ class BaseVC : UIViewController { override func viewDidLoad() { setNeedsStatusBarAppearanceUpdate() NotificationCenter.default.addObserver(self, selector: #selector(handleAppModeChangedNotification(_:)), name: .appModeChanged, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(appDidBecomeActive(_:)), name: .OWSApplicationDidBecomeActive, object: nil) } internal func ensureWindowBackground() { @@ -104,6 +105,10 @@ class BaseVC : UIViewController { deinit { NotificationCenter.default.removeObserver(self) } + + @objc func appDidBecomeActive(_ notification: Notification) { + // To be implemented + } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { if #available(iOS 13.0, *) {