Skip to content

Commit be62c0a

Browse files
privacy fix
Signed-off-by: Marino Faggiana <[email protected]>
1 parent 1c13849 commit be62c0a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

Share/NCShareExtension+NCAccountRequestDelegate.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ extension NCShareExtension: NCAccountRequestDelegate {
5555
}
5656
await self.database.applyCachedCapabilitiesAsync(account: account)
5757

58-
// COLORS
5958
NCBrandColor.shared.settingThemingColor(account: account)
6059

61-
// NETWORKING
6260
NextcloudKit.shared.setup(groupIdentifier: NCBrandOptions.shared.capabilitiesGroup, delegate: NCNetworking.shared)
6361
NextcloudKit.shared.appendSession(account: tblAccount.account,
6462
urlBase: tblAccount.urlBase,
@@ -71,7 +69,6 @@ extension NCShareExtension: NCAccountRequestDelegate {
7169
httpMaximumConnectionsPerHostInUpload: NCBrandOptions.shared.httpMaximumConnectionsPerHostInUpload,
7270
groupIdentifier: NCBrandOptions.shared.capabilitiesGroup)
7371

74-
// get auto upload folder
7572
autoUploadFileName = self.database.getAccountAutoUploadFileName(account: account)
7673
autoUploadDirectory = self.database.getAccountAutoUploadDirectory(session: session)
7774

Share/NCShareExtension.swift

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,28 +84,36 @@ class NCShareExtension: UIViewController {
8484
let uploadGesture = UITapGestureRecognizer(target: self, action: #selector(actionUpload(_:)))
8585
uploadView.addGestureRecognizer(uploadGesture)
8686

87-
// LOG
8887
let versionNextcloudiOS = String(format: NCBrandOptions.shared.textCopyrightNextcloudiOS, utility.getVersionApp())
89-
9088
NextcloudKit.configureLogger(logLevel: (NCBrandOptions.shared.disable_log ? .disabled : NCKeychain().log))
9189

92-
nkLog(start: " Start Share session " + versionNextcloudiOS)
90+
nkLog(start: "Start Share session " + versionNextcloudiOS)
9391

9492
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+
}
95105
}
96106

97107
override func viewWillAppear(_ animated: Bool) {
98108
super.viewWillAppear(animated)
99109

100-
guard let tblAccount = extensionData.getTblAccoun(),
110+
guard extensionData.getTblAccoun() != nil,
101111
!NCPasscode.shared.isPasscodeReset else {
102112
return showAlert(description: "_no_active_account_") {
103113
self.cancel(with: .noAccount)
104114
}
105115
}
106116

107-
accountRequestChangeAccount(account: tblAccount.account, controller: nil)
108-
109117
guard let inputItems = extensionContext?.inputItems as? [NSExtensionItem] else {
110118
cancel(with: .noFiles)
111119
return

0 commit comments

Comments
 (0)