Fix crash when app moved to background

This commit is contained in:
Benoit Martins 2023-06-19 10:52:11 +02:00
parent 5fe7f44e10
commit 22a248e03a

View file

@ -152,7 +152,7 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
setupViews()
markAsRead = true
UIApplication.shared.keyWindow?.makeSecure(field: field)
PhoneMainView.instance()!.mainViewController.view.makeSecure(field: field)
NotificationCenter.default.addObserver(forName: UIApplication.userDidTakeScreenshotNotification, object: nil, queue: OperationQueue.main) { notification in
if (ConfigManager.instance().lpConfigBoolForKey(key: "screenshot_preference") == false && self.floatingButton.isHidden == false) {