ui: set local file encryption in the core (#3227)

This commit is contained in:
Evgeny Poberezkin
2023-10-15 20:58:39 +01:00
committed by GitHub
parent e6b0983c3e
commit 43b67ba157
6 changed files with 25 additions and 9 deletions
+2 -2
View File
@@ -257,7 +257,7 @@ func setXFTPConfig(_ cfg: XFTPFileConfig?) throws {
throw r
}
func apiSetEncryptLocalFiles(_ enable: Boolean) throws {
func apiSetEncryptLocalFiles(_ enable: Bool) throws {
let r = chatSendCmdSync(.apiSetEncryptLocalFiles(enable: enable))
if case .cmdOk = r { return }
throw r
@@ -1158,7 +1158,7 @@ func initializeChat(start: Bool, dbKey: String? = nil, refreshInvitations: Bool
try apiSetTempFolder(tempFolder: getTempFilesDirectory().path)
try apiSetFilesFolder(filesFolder: getAppFilesDirectory().path)
try setXFTPConfig(getXFTPCfg())
// try apiSetEncryptLocalFiles(privacyEncryptLocalFilesGroupDefault.get())
try apiSetEncryptLocalFiles(privacyEncryptLocalFilesGroupDefault.get())
m.chatInitialized = true
m.currentUser = try apiGetActiveUser()
if m.currentUser == nil {