forked from mirrors/linphone-iphone
Disable screenshot secure mode
This commit is contained in:
parent
22a248e03a
commit
eb5305107e
2 changed files with 9 additions and 7 deletions
|
|
@ -152,7 +152,7 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
setupViews()
|
||||
markAsRead = true
|
||||
|
||||
PhoneMainView.instance()!.mainViewController.view.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) {
|
||||
|
|
@ -301,11 +301,13 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
configureMessageField()
|
||||
ChatConversationViewModel.sharedModel.shareFile()
|
||||
|
||||
/*
|
||||
if ConfigManager.instance().lpConfigBoolForKey(key: "screenshot_preference") == false && floatingButton.isHidden == false {
|
||||
UIApplication.shared.keyWindow?.changeSecure(field: field, isSecure: true)
|
||||
PhoneMainView.instance()!.mainViewController.view.changeSecure(field: field, isSecure: true)
|
||||
}else{
|
||||
UIApplication.shared.keyWindow?.changeSecure(field: field, isSecure: false)
|
||||
PhoneMainView.instance()!.mainViewController.view.changeSecure(field: field, isSecure: false)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
|
|
@ -314,7 +316,7 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
}
|
||||
AvatarBridge.removeAllObserver()
|
||||
|
||||
UIApplication.shared.keyWindow?.changeSecure(field: field, isSecure: false)
|
||||
//PhoneMainView.instance()!.mainViewController.view.changeSecure(field: field, isSecure: false)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
|
|
|
|||
|
|
@ -402,14 +402,14 @@ class BackActionsNavigationView: UIViewController {
|
|||
@objc func changeSizeOfTextView(){
|
||||
let numLines = (messageView.messageText.contentSize.height / messageView.messageText.font!.lineHeight)
|
||||
if numLines >= 3 && numLines <= 6 {
|
||||
messageView.setHeight(33*numLines - 33, animateTime: 0.1)
|
||||
messageView.setHeight(33*numLines - 33)
|
||||
} else if numLines < 3 {
|
||||
messageView.setHeight(66, animateTime: 0.1)
|
||||
messageView.setHeight(66)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func resetSizeOfTextView(){
|
||||
messageView.setHeight(66, animateTime: 0.1)
|
||||
messageView.setHeight(66)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue