diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt index 1fcb96c8aa..f79389e91e 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt @@ -1744,9 +1744,8 @@ open class ChatController(var ctrl: ChatCtrl?, val ntfManager: NtfManager, val a } } - fun getXFTPCfg(): XFTPFileConfig? { - val prefXFTPSendEnabled = appPrefs.xftpSendEnabled.get() - return if (prefXFTPSendEnabled) XFTPFileConfig(minFileSize = 0) else null + fun getXFTPCfg(): XFTPFileConfig { + return XFTPFileConfig(minFileSize = 0) } fun getNetCfg(): NetCfg { diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/DeveloperView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/DeveloperView.kt index e6776a84d5..bad5145763 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/DeveloperView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/usersettings/DeveloperView.kt @@ -44,15 +44,15 @@ fun DeveloperView( ) SectionSpacer() - val xftpSendEnabled = m.controller.appPrefs.xftpSendEnabled - val xftpEnabled = remember { mutableStateOf(xftpSendEnabled.get()) } - SectionView(generalGetString(R.string.settings_section_title_experimenta)) { - SettingsPreferenceItem(Icons.Outlined.UploadFile, stringResource(R.string.settings_send_files_via_xftp), xftpSendEnabled, xftpEnabled) { - withApi { m.controller.apiSetXFTPConfig(m.controller.getXFTPCfg()) } - } - } - if (xftpEnabled.value) { - SectionTextFooter(generalGetString(R.string.xftp_requires_v461)) - } +// val xftpSendEnabled = m.controller.appPrefs.xftpSendEnabled +// val xftpEnabled = remember { mutableStateOf(xftpSendEnabled.get()) } +// SectionView(generalGetString(R.string.settings_section_title_experimenta)) { +// SettingsPreferenceItem(Icons.Outlined.UploadFile, stringResource(R.string.settings_send_files_via_xftp), xftpSendEnabled, xftpEnabled) { +// withApi { m.controller.apiSetXFTPConfig(m.controller.getXFTPCfg()) } +// } +// } +// if (xftpEnabled.value) { +// SectionTextFooter(generalGetString(R.string.xftp_requires_v461)) +// } } } diff --git a/apps/ios/Shared/Views/UserSettings/DeveloperView.swift b/apps/ios/Shared/Views/UserSettings/DeveloperView.swift index 596a4e4be6..a6bd3bda74 100644 --- a/apps/ios/Shared/Views/UserSettings/DeveloperView.swift +++ b/apps/ios/Shared/Views/UserSettings/DeveloperView.swift @@ -44,24 +44,24 @@ struct DeveloperView: View { (developerTools ? Text("Show:") : Text("Hide:")) + Text(" ") + Text("Database IDs and Transport isolation option.") } - Section { - settingsRow("arrow.up.doc") { - Toggle("Send videos and files via XFTP", isOn: $xftpSendEnabled) - .onChange(of: xftpSendEnabled) { _ in - do { - try setXFTPConfig(getXFTPCfg()) - } catch { - logger.error("setXFTPConfig: cannot set XFTP config \(responseError(error))") - } - } - } - } header: { - Text("Experimental") - } footer: { - if xftpSendEnabled { - Text("v4.6.1+ is required to receive via XFTP.") - } - } +// Section { +// settingsRow("arrow.up.doc") { +// Toggle("Send videos and files via XFTP", isOn: $xftpSendEnabled) +// .onChange(of: xftpSendEnabled) { _ in +// do { +// try setXFTPConfig(getXFTPCfg()) +// } catch { +// logger.error("setXFTPConfig: cannot set XFTP config \(responseError(error))") +// } +// } +// } +// } header: { +// Text("Experimental") +// } footer: { +// if xftpSendEnabled { +// Text("v4.6.1+ is required to receive via XFTP.") +// } +// } } } } diff --git a/apps/ios/SimpleXChat/AppGroup.swift b/apps/ios/SimpleXChat/AppGroup.swift index a738dd5865..b69411a75d 100644 --- a/apps/ios/SimpleXChat/AppGroup.swift +++ b/apps/ios/SimpleXChat/AppGroup.swift @@ -203,9 +203,8 @@ public class Default { } } -public func getXFTPCfg() -> XFTPFileConfig? { - let xftpSendEnabled = xftpSendEnabledGroupDefault.get() - return xftpSendEnabled ? XFTPFileConfig(minFileSize: 0) : nil +public func getXFTPCfg() -> XFTPFileConfig { + return XFTPFileConfig(minFileSize: 0) } public func getNetCfg() -> NetCfg { diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 9d2c44fb7d..a3970eb4b0 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -110,7 +110,7 @@ defaultChatConfig = fileChunkSize = 15780, -- do not change xftpDescrPartSize = 14000, inlineFiles = defaultInlineFilesConfig, - xftpFileConfig = Nothing, + xftpFileConfig = Just defaultXFTPFileConfig, tempDir = Nothing, logLevel = CLLImportant, subscriptionEvents = False, diff --git a/tests/ChatClient.hs b/tests/ChatClient.hs index 19e5f31567..eb15e3f0e1 100644 --- a/tests/ChatClient.hs +++ b/tests/ChatClient.hs @@ -111,7 +111,8 @@ testCfg = defaultChatConfig { agentConfig = testAgentCfg, testView = True, - tbqSize = 16 + tbqSize = 16, + xftpFileConfig = Nothing } testAgentCfgV1 :: AgentConfig