Files
simplex-chat/apps/ios/Shared/Views/UserSettings/ExperimentalFeaturesView.swift
spaced4ndy ef05fa4905 core: file protocol field; ios: distinguish behavior and look of XFTP and SMP files (#2090)
* core: file protocol field; ios: distinguish behavior and look of XFTP and SMP files

* remove unused method

* count style

* corrections

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-03-28 19:20:06 +01:00

38 lines
1.1 KiB
Swift

//
// ExperimentalFeaturesView.swift
// SimpleX (iOS)
//
// Created by Evgeny on 30/05/2022.
// Copyright © 2022 SimpleX Chat. All rights reserved.
//
import SwiftUI
import SimpleXChat
struct ExperimentalFeaturesView: View {
@AppStorage(GROUP_DEFAULT_XFTP_SEND_ENABLED, store: groupDefaults) private var xftpSendEnabled = false
var body: some View {
List {
Section("") {
settingsRow("arrow.up.doc") {
Toggle("Send files via XFTP", isOn: $xftpSendEnabled)
.onChange(of: xftpSendEnabled) { _ in
do {
try setXFTPConfig(getXFTPCfg())
} catch {
logger.error("setXFTPConfig: cannot set XFTP config \(responseError(error))")
}
}
}
}
}
}
}
struct ExperimentalFeaturesView_Previews: PreviewProvider {
static var previews: some View {
ExperimentalFeaturesView()
}
}