@@ -84,28 +84,36 @@ class NCShareExtension: UIViewController {
84
84
let uploadGesture = UITapGestureRecognizer ( target: self , action: #selector( actionUpload ( _: ) ) )
85
85
uploadView. addGestureRecognizer ( uploadGesture)
86
86
87
- // LOG
88
87
let versionNextcloudiOS = String ( format: NCBrandOptions . shared. textCopyrightNextcloudiOS, utility. getVersionApp ( ) )
89
-
90
88
NextcloudKit . configureLogger ( logLevel: ( NCBrandOptions . shared. disable_log ? . disabled : NCKeychain ( ) . log) )
91
89
92
- nkLog ( start: " Start Share session " + versionNextcloudiOS)
90
+ nkLog ( start: " Start Share session " + versionNextcloudiOS)
93
91
94
92
NCBrandColor . shared. createUserColors ( )
93
+
94
+ NotificationCenter . default. addObserver ( forName: UIApplication . willEnterForegroundNotification, object: nil , queue: nil ) { _ in
95
+ if NCKeychain ( ) . presentPasscode {
96
+ NCPasscode . shared. presentPasscode ( viewController: self , delegate: self ) {
97
+ NCPasscode . shared. enableTouchFaceID ( )
98
+ }
99
+ }
100
+ }
101
+
102
+ if let account = extensionData. getTblAccoun ( ) ? . account {
103
+ accountRequestChangeAccount ( account: account, controller: nil )
104
+ }
95
105
}
96
106
97
107
override func viewWillAppear( _ animated: Bool ) {
98
108
super. viewWillAppear ( animated)
99
109
100
- guard let tblAccount = extensionData. getTblAccoun ( ) ,
110
+ guard extensionData. getTblAccoun ( ) != nil ,
101
111
!NCPasscode. shared. isPasscodeReset else {
102
112
return showAlert ( description: " _no_active_account_ " ) {
103
113
self . cancel ( with: . noAccount)
104
114
}
105
115
}
106
116
107
- accountRequestChangeAccount ( account: tblAccount. account, controller: nil )
108
-
109
117
guard let inputItems = extensionContext? . inputItems as? [ NSExtensionItem ] else {
110
118
cancel ( with: . noFiles)
111
119
return
0 commit comments