mobile: remove XFTP toggle (#2208)

* mobile: remove XFTP toggle

* ios: remove unused string

* android: remove unused strings
This commit is contained in:
Evgeny Poberezkin
2023-04-19 10:41:01 +02:00
committed by GitHub
parent a6c1f2f776
commit 37f835be8c
46 changed files with 11 additions and 244 deletions
@@ -153,8 +153,6 @@ class AppPreferences(val context: Context) {
val whatsNewVersion = mkStrPreference(SHARED_PREFS_WHATS_NEW_VERSION, null)
val xftpSendEnabled = mkBoolPreference(SHARED_PREFS_XFTP_SEND_ENABLED, false)
private fun mkIntPreference(prefName: String, default: Int) =
SharedPreference(
get = fun() = sharedPreferences.getInt(prefName, default),
@@ -264,7 +262,6 @@ class AppPreferences(val context: Context) {
private const val SHARED_PREFS_CURRENT_THEME = "CurrentTheme"
private const val SHARED_PREFS_PRIMARY_COLOR = "PrimaryColor"
private const val SHARED_PREFS_WHATS_NEW_VERSION = "WhatsNewVersion"
private const val SHARED_PREFS_XFTP_SEND_ENABLED = "XFTPSendEnabled"
}
}
@@ -179,8 +179,7 @@ fun ComposeView(
val pendingLinkUrl = rememberSaveable { mutableStateOf<String?>(null) }
val cancelledLinks = rememberSaveable { mutableSetOf<String>() }
val useLinkPreviews = chatModel.controller.appPrefs.privacyLinkPreviews.get()
val xftpSendEnabled = chatModel.controller.appPrefs.xftpSendEnabled.get()
val maxFileSize = getMaxFileSize(fileProtocol = if (xftpSendEnabled) FileProtocol.XFTP else FileProtocol.SMP)
val maxFileSize = getMaxFileSize(FileProtocol.XFTP)
val smallFont = MaterialTheme.typography.body1.copy(color = MaterialTheme.colors.onBackground)
val textStyle = remember { mutableStateOf(smallFont) }
val cameraLauncher = rememberCameraLauncher { uri: Uri? ->
@@ -279,7 +278,7 @@ fun ComposeView(
attachmentOption.value = null
}
AttachmentOption.PickMedia -> {
mediaLauncherWithFiles.launch(if (xftpSendEnabled) "image/*;video/*" else "image/*")
mediaLauncherWithFiles.launch("image/*;video/*")
attachmentOption.value = null
}
AttachmentOption.PickFile -> {
@@ -43,16 +43,5 @@ fun DeveloperView(
generalGetString(R.string.developer_options)
)
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))
// }
}
}
@@ -1,37 +0,0 @@
package chat.simplex.app.views.usersettings
import SectionView
import androidx.compose.foundation.layout.*
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.UploadFile
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import chat.simplex.app.R
import chat.simplex.app.model.ChatModel
import chat.simplex.app.views.helpers.withApi
@Composable
fun ExperimentalFeaturesView(chatModel: ChatModel) {
Column(
Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.Start
) {
Text(
stringResource(R.string.settings_experimental_features),
style = MaterialTheme.typography.h1,
modifier = Modifier.padding(start = 16.dp, bottom = 24.dp)
)
SectionView("") {
SettingsPreferenceItem(Icons.Outlined.UploadFile, stringResource(R.string.settings_send_files_via_xftp), chatModel.controller.appPrefs.xftpSendEnabled) {
withApi {
chatModel.controller.apiSetXFTPConfig(chatModel.controller.getXFTPCfg())
}
}
}
}
}
@@ -48,7 +48,6 @@ fun NetworkAndServersView(
NetworkAndServersLayout(
developerTools = developerTools,
xftpSendEnabled = remember { chatModel.controller.appPrefs.xftpSendEnabled.state },
networkUseSocksProxy = networkUseSocksProxy,
onionHosts = onionHosts,
sessionMode = sessionMode,
@@ -145,7 +144,6 @@ fun NetworkAndServersView(
@Composable fun NetworkAndServersLayout(
developerTools: Boolean,
xftpSendEnabled: State<Boolean>,
networkUseSocksProxy: MutableState<Boolean>,
onionHosts: MutableState<OnionHosts>,
sessionMode: MutableState<TransportSessionMode>,
@@ -167,10 +165,8 @@ fun NetworkAndServersView(
SettingsActionItem(Icons.Outlined.Dns, stringResource(R.string.smp_servers), showCustomModal { m, close -> ProtocolServersView(m, ServerProtocol.SMP, close) })
SectionDivider()
if (xftpSendEnabled.value) {
SettingsActionItem(Icons.Outlined.Dns, stringResource(R.string.xftp_servers), showCustomModal { m, close -> ProtocolServersView(m, ServerProtocol.XFTP, close) })
SectionDivider()
}
SettingsActionItem(Icons.Outlined.Dns, stringResource(R.string.xftp_servers), showCustomModal { m, close -> ProtocolServersView(m, ServerProtocol.XFTP, close) })
SectionDivider()
SectionItemView {
UseSocksProxySwitch(networkUseSocksProxy, proxyPort, toggleSocksProxy, showSettingsModal)
@@ -434,7 +430,6 @@ fun PreviewNetworkAndServersLayout() {
SimpleXTheme {
NetworkAndServersLayout(
developerTools = true,
xftpSendEnabled = remember { mutableStateOf(true) },
networkUseSocksProxy = remember { mutableStateOf(true) },
proxyPort = remember { mutableStateOf(9050) },
showModal = { {} },
@@ -207,8 +207,6 @@ fun SettingsLayout(
SectionView(stringResource(R.string.settings_section_title_develop)) {
SettingsActionItem(Icons.Outlined.Code, stringResource(R.string.settings_developer_tools), showSettingsModal { DeveloperView(it, showCustomModal, withAuth) })
SectionDivider()
// SettingsActionItem(Icons.Outlined.Science, stringResource(R.string.settings_experimental_features), showSettingsModal { ExperimentalFeaturesView(it) })
// SectionDivider()
AppVersionItem(showVersion)
}
}
@@ -1019,7 +1019,6 @@
<string name="you_will_still_receive_calls_and_ntfs">Stále budete přijímat volání a upozornění od umlčených profilů pokud budou aktivní.</string>
<string name="you_can_hide_or_mute_user_profile">Můžete skrýt nebo ztlumit uživatelský profil - Podržte pro menu.</string>
<string name="user_unhide">Odkrýt</string>
<string name="settings_send_files_via_xftp">Poslat videa a soubory přes XFTP</string>
<string name="database_upgrade">Aktualizace databáze</string>
<string name="database_downgrade_warning">Upozornění: můžete ztratit nějaká data!</string>
<string name="confirm_database_upgrades">Potvrdit aktualizaci databáze</string>
@@ -1034,7 +1033,6 @@
<string name="hide_dev_options">Skrýt:</string>
<string name="show_developer_options">Zobrazit možnosti vývojáře</string>
<string name="settings_section_title_experimenta">POKUSNÝ</string>
<string name="xftp_requires_v461">Pro příjem přes XFTP je vyžadována verze 4.6.1+.</string>
<string name="image_will_be_received_when_contact_completes_uploading">Obrázek bude přijat, až kontakt dokončí jeho nahrání.</string>
<string name="show_dev_options">Zobrazit:</string>
<string name="developer_options">ID databáze a možnost Izolace přenosu.</string>
@@ -1098,7 +1098,6 @@
<string name="group_welcome_title">Begrüßungsmeldung</string>
<string name="you_can_hide_or_mute_user_profile">Sie können ein Benutzerprofil verbergen oder stummschalten - für das Menü gedrückt halten.</string>
<string name="to_reveal_profile_enter_password">Geben Sie ein vollständiges Passwort in das Suchfeld auf der Seite \"Meine Chat-Profile\" ein, um Ihr verborgenes Profil zu sehen.</string>
<string name="settings_send_files_via_xftp">Videos und Dateien per XFTP versenden</string>
<string name="invalid_migration_confirmation">Migrations-Bestätigung ungültig</string>
<string name="upgrade_and_open_chat">Aktualisieren und den Chat öffnen</string>
<string name="confirm_database_upgrades">Datenbank-Aktualisierungen bestätigen</string>
@@ -1115,7 +1114,6 @@
<string name="mtr_error_no_down_migration">Die Datenbank-Version ist neuer als die App, keine Abwärts-Migration für: %s</string>
<string name="hide_dev_options">Verberge:</string>
<string name="database_migrations">Migrationen: %s</string>
<string name="xftp_requires_v461">Für den Empfang per XFTP wird v4.6.1 oder neuer benötigt.</string>
<string name="image_will_be_received_when_contact_completes_uploading">Das Bild wird empfangen, sobald das Hochladen durch ihren Kontakt abgeschlossen ist.</string>
<string name="file_will_be_received_when_contact_completes_uploading">Die Datei wird empfangen, sobald das Hochladen durch ihren Kontakt abgeschlossen ist.</string>
<string name="cancel_file__question">Dateitransfer abbrechen\?</string>
@@ -1020,7 +1020,6 @@
\n- borrar mensajes de los miembros.
\n- desactivar el rol a miembros (a rol \"observador\")</string>
<string name="to_reveal_profile_enter_password">Para hacer visible tu perfil oculto, introduce la contraseña completa en el campo de búsqueda de la página Tus perfiles Chat.</string>
<string name="settings_send_files_via_xftp">Enviar vídeos y archivos mediante XFTP</string>
<string name="database_upgrade">Actualización de la base de datos</string>
<string name="database_downgrade">Volviendo a versión anterior de la base de datos</string>
<string name="invalid_migration_confirmation">Confirmación de migración no válida</string>
@@ -1036,7 +1035,6 @@
<string name="developer_options">ID de base de datos y opción de aislamiento de transporte.</string>
<string name="file_will_be_received_when_contact_completes_uploading">El archivo se recibirá cuando tu contacto termine de subirlo.</string>
<string name="image_will_be_received_when_contact_completes_uploading">La imagen se recibirá cuando tu contacto termine de subirla.</string>
<string name="xftp_requires_v461">Se requiere v4.6.1+ para recibir vía XFTP.</string>
<string name="show_developer_options">Mostrar opciones de desarrollador</string>
<string name="hide_dev_options">Ocultar:</string>
<string name="show_dev_options">Mostrar:</string>
@@ -1019,7 +1019,6 @@
<string name="group_welcome_title">Message d\'accueil</string>
<string name="you_can_hide_or_mute_user_profile">Vous pouvez masquer ou mettre en sourdine un profil d\'utilisateur - maintenez-le enfoncé pour accéder au menu.</string>
<string name="you_will_still_receive_calls_and_ntfs">Vous continuerez à recevoir des appels et des notifications des profils mis en sourdine lorsqu\'ils sont actifs.</string>
<string name="settings_send_files_via_xftp">Envoi de vidéos et de fichiers via XFTP</string>
<string name="database_downgrade">Rétrogradation de la base de données</string>
<string name="database_upgrade">Mise à niveau de la base de données</string>
<string name="incompatible_database_version">Version de la base de données incompatible</string>
@@ -1035,7 +1034,6 @@
<string name="show_dev_options">Afficher :</string>
<string name="show_developer_options">Afficher les options pour les développeurs</string>
<string name="file_will_be_received_when_contact_completes_uploading">Le fichier sera reçu lorsque votre contact aura terminé de le mettre en ligne.</string>
<string name="xftp_requires_v461">v4.6.1+ nécessaire pour la réception via XFTP.</string>
<string name="developer_options">IDs de base de données et option d\'isolation du transport.</string>
<string name="settings_section_title_experimenta">EXPÉRIMENTALE</string>
<string name="hide_dev_options">Cacher :</string>
@@ -1019,7 +1019,6 @@
<string name="user_hide">Nascondi</string>
<string name="v4_6_group_welcome_message_descr">Imposta il messaggio mostrato ai nuovi membri!</string>
<string name="user_unmute">Riattiva audio</string>
<string name="settings_send_files_via_xftp">Invia video e file via XFTP</string>
<string name="database_downgrade">Downgrade del database</string>
<string name="database_upgrade">Aggiornamento del database</string>
<string name="incompatible_database_version">Versione del database incompatibile</string>
@@ -1028,7 +1027,6 @@
<string name="hide_dev_options">Nascondi:</string>
<string name="show_dev_options">Mostra:</string>
<string name="show_developer_options">Mostra opzioni sviluppatore</string>
<string name="xftp_requires_v461">v4.6.1+ necessaria per ricevere via XFTP.</string>
<string name="downgrade_and_open_chat">Esegui downgrade e apri chat</string>
<string name="database_migrations">Migrazioni: %s</string>
<string name="database_downgrade_warning">Attenzione: potresti perdere alcuni dati!</string>
@@ -841,7 +841,6 @@
<string name="select_contacts">연락처 선택</string>
<string name="skip_inviting_button">멤버 초대 건너뛰기</string>
<string name="sending_via">다음을 통해 보내기</string>
<string name="settings_send_files_via_xftp">XFTP로 동영상 및 파일 보내기</string>
<string name="stop_chat_confirmation">멈추기</string>
<string name="snd_group_event_changed_member_role">%s의 역할을 %s로 변경했어요.</string>
<string name="section_title_for_console">콘솔용</string>
@@ -1018,7 +1018,6 @@
<string name="to_reveal_profile_enter_password">Om uw verborgen profiel te onthullen, voert u een volledig wachtwoord in een zoekveld in op de pagina Uw chat profielen.</string>
<string name="button_welcome_message">Welkomst bericht</string>
<string name="you_will_still_receive_calls_and_ntfs">U ontvangt nog steeds oproepen en meldingen van gedempte profielen wanneer deze actief zijn.</string>
<string name="settings_send_files_via_xftp">Verzend video\'s en bestanden via XFTP</string>
<string name="database_downgrade">Database downgraden</string>
<string name="invalid_migration_confirmation">Ongeldige migratie bevestiging</string>
<string name="upgrade_and_open_chat">Upgrade en open chat</string>
@@ -1037,7 +1036,6 @@
<string name="hide_dev_options">Verbergen:</string>
<string name="show_developer_options">Ontwikkelaars opties tonen</string>
<string name="settings_section_title_experimenta">EXPERIMENTEEL</string>
<string name="xftp_requires_v461">v4.6.1+ is vereist om te ontvangen via XFTP.</string>
<string name="cancel_file__question">Bestand overdracht annuleren\?</string>
<string name="file_transfer_will_be_cancelled_warning">Bestand overdracht wordt geannuleerd. Als het bezig is, wordt het gestopt.</string>
<string name="delete_profile">Verwijder profiel</string>
@@ -539,13 +539,11 @@
<string name="protect_app_screen">Chroń ekran aplikacji</string>
<string name="run_chat_section">URUCHOM CZAT</string>
<string name="send_link_previews">Wyślij podgląd linku</string>
<string name="settings_send_files_via_xftp">Wysyłaj filmy i pliki przez XFTP</string>
<string name="settings_section_title_settings">USTAWIENIA</string>
<string name="settings_section_title_socks">PROXY SOCKS</string>
<string name="stop_chat_question">Zatrzymać czat\?</string>
<string name="settings_section_title_support">WSPIERAJ SIMPLEX CHAT</string>
<string name="settings_section_title_themes">MOTYWY</string>
<string name="xftp_requires_v461">v4.6.1+ jest wymagany do odbierania przez XFTP.</string>
<string name="settings_section_title_you">TY</string>
<string name="your_chat_database">Twoja baza danych czatu</string>
<string name="set_password_to_export">Ustaw hasło do eksportu</string>
@@ -699,7 +699,6 @@
<string name="group_member_status_invited">convidado</string>
<string name="select_contacts">Selecionar contatos</string>
<string name="num_contacts_selected">%d contato(s) selecionado(s)</string>
<string name="settings_send_files_via_xftp">Envie vídeos e arquivos via XFTP</string>
<string name="delete_chat_profile_action_cannot_be_undone_warning">Esta ação não pode ser desfeita - seu perfil, contatos, mensagens e arquivos serão irreversivelmente perdidos.</string>
<string name="remove_passphrase">Remover</string>
<string name="wrong_passphrase">Senha do banco de dados incorreta</string>
@@ -1010,7 +1009,6 @@
<string name="callstate_waiting_for_confirmation">aguardando confirmação…</string>
<string name="we_do_not_store_contacts_or_messages_on_servers">Não armazenamos nenhum dos seus contatos ou mensagens (uma vez entregues) nos servidores.</string>
<string name="alert_title_skipped_messages">Mensagens ignoradas</string>
<string name="xftp_requires_v461">v4.6.1+ é necessário receber via XFTP.</string>
<string name="tap_to_activate_profile">Toque para ativar o perfil.</string>
<string name="unhide_chat_profile">Mostrar perfil de chat</string>
<string name="unhide_profile">Mostrar perfil</string>
@@ -1102,7 +1102,6 @@
<string name="v4_6_chinese_spanish_interface_descr">Благодаря пользователям – добавьте переводы через Weblate!</string>
<string name="you_will_still_receive_calls_and_ntfs">Вы все равно получите звонки и уведомления в профилях без звука, когда они активные.</string>
<string name="you_can_hide_or_mute_user_profile">Вы можете скрыть профиль или выключить уведомления - подержите, чтобы увидеть меню.</string>
<string name="settings_send_files_via_xftp">Отправлять видео и файлы через XFTP</string>
<string name="image_will_be_received_when_contact_completes_uploading">Изображение будет принято когда Ваш контакт его загрузит.</string>
<string name="file_will_be_received_when_contact_completes_uploading">Файл будет принят когда Ваш контакт загрузит его.</string>
<string name="database_upgrade">Обновление базы данных</string>
@@ -1124,7 +1123,6 @@
<string name="delete_chat_profile">Удалить профиль чата</string>
<string name="delete_profile">Удалить профиль</string>
<string name="profile_password">Пароль профиля</string>
<string name="xftp_requires_v461">v4.6.1+ необходима для приема файлов через XFTP.</string>
<string name="videos_limit_title">Слишком много видео!</string>
<string name="icon_descr_video_asked_to_receive">Запросил прием видео</string>
<string name="video_descr">Видео</string>
@@ -1019,7 +1019,6 @@
<string name="you_will_still_receive_calls_and_ntfs">当静音配置文件处于活动状态时,您仍会收到来自静音配置文件的电话和通知。</string>
<string name="you_can_hide_or_mute_user_profile">您可以隐藏或静音用户配置文件——长按以显示菜单。</string>
<string name="group_welcome_title">欢迎信息</string>
<string name="settings_send_files_via_xftp">通过 XFTP 发送视频和文件</string>
<string name="confirm_database_upgrades">确认数据库升级</string>
<string name="settings_section_title_experimenta">实验性</string>
<string name="database_upgrade">数据库升级</string>
@@ -1034,7 +1033,6 @@
<string name="database_migrations">迁移:%s</string>
<string name="image_will_be_received_when_contact_completes_uploading">图片将在您的联系人完成上传后收到。</string>
<string name="show_developer_options">显示开发者选项</string>
<string name="xftp_requires_v461">通过 XFTP 接收需要 v4.6.1 以上版本。</string>
<string name="upgrade_and_open_chat">升级并打开聊天</string>
<string name="database_downgrade_warning">警告:您可能会丢失部分数据!</string>
<string name="invalid_migration_confirmation">迁移确认无效</string>
@@ -1025,7 +1025,6 @@
<string name="user_unmute">取消靜音</string>
<string name="you_will_still_receive_calls_and_ntfs">當靜音配置檔案處於活動狀態時,你仍會收到來自靜音配置檔案的通話和通知。</string>
<string name="user_unhide">取消隱藏</string>
<string name="settings_send_files_via_xftp">通過 XFTP 傳送影片和檔案</string>
<string name="video_will_be_received_when_contact_is_online">影片將會在你的聯絡人在線時接收,請你等等或者稍後再檢查!</string>
<string name="confirm_database_upgrades">確認數據庫更新</string>
<string name="incompatible_database_version">數據庫版本不相容</string>
@@ -1039,7 +1038,6 @@
<string name="image_will_be_received_when_contact_completes_uploading">圖片將會在你的聯絡人完成上傳後接收。</string>
<string name="file_will_be_received_when_contact_completes_uploading">檔案將會在你的聯絡人完成上傳後接收。</string>
<string name="settings_section_title_experimenta">實驗性</string>
<string name="xftp_requires_v461">通過 XFTP 去接收需要 v4.6.1 以上的版本。</string>
<string name="upgrade_and_open_chat">升級和開始對話</string>
<string name="cancel_file__question">取消傳輸檔案?</string>
<string name="file_transfer_will_be_cancelled_warning">檔案傳遞將會取消。若是在傳遞檔案中,亦會暫停。</string>
@@ -802,8 +802,6 @@
<string name="settings_section_title_calls">CALLS</string>
<string name="settings_section_title_incognito">Incognito mode</string>
<string name="settings_section_title_experimenta">EXPERIMENTAL</string>
<string name="settings_send_files_via_xftp">Send videos and files via XFTP</string>
<string name="xftp_requires_v461">v4.6.1+ is required to receive via XFTP.</string>
<!-- DatabaseView.kt -->
<string name="your_chat_database">Your chat database</string>
@@ -241,8 +241,6 @@ struct ComposeView: View {
@State var pendingLinkUrl: URL? = nil
@State var cancelledLinks: Set<String> = []
@AppStorage(GROUP_DEFAULT_XFTP_SEND_ENABLED, store: groupDefaults) private var xftpSendEnabled = false
@State private var showChooseSource = false
@State private var showMediaPicker = false
@State private var showTakePhoto = false
@@ -462,8 +460,7 @@ struct ComposeView: View {
}
private var maxFileSize: Int64 {
let fileProtocol: FileProtocol = xftpSendEnabled ? .xftp : .smp
return getMaxFileSize(fileProtocol)
getMaxFileSize(.xftp)
}
private func sendLiveMessage() async {
@@ -28,7 +28,6 @@ struct LibraryImagePicker: View {
struct LibraryMediaListPicker: UIViewControllerRepresentable {
typealias UIViewControllerType = PHPickerViewController
@AppStorage(GROUP_DEFAULT_XFTP_SEND_ENABLED, store: groupDefaults) var xftpSendEnabled = false
@Binding var media: [UploadContent]
var selectionLimit: Int
var didFinishPicking: (_ didSelectItems: Bool) -> Void
@@ -131,12 +130,7 @@ struct LibraryMediaListPicker: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> PHPickerViewController {
var config = PHPickerConfiguration()
let allowVideoAttachment = xftpSendEnabled
if allowVideoAttachment {
config.filter = .any(of: [.images, .videos])
} else {
config.filter = .images
}
config.filter = .any(of: [.images, .videos])
config.selectionLimit = selectionLimit
config.selection = .ordered
//config.preferredAssetRepresentationMode = .current
@@ -12,7 +12,6 @@ import SimpleXChat
struct DeveloperView: View {
@AppStorage(DEFAULT_DEVELOPER_TOOLS) private var developerTools = false
@AppStorage(GROUP_DEFAULT_CONFIRM_DB_UPGRADES, store: groupDefaults) private var confirmDatabaseUpgrades = false
@AppStorage(GROUP_DEFAULT_XFTP_SEND_ENABLED, store: groupDefaults) private var xftpSendEnabled = false
@Environment(\.colorScheme) var colorScheme
var body: some View {
@@ -1,37 +0,0 @@
//
// 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 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))")
}
}
}
}
}
}
}
struct ExperimentalFeaturesView_Previews: PreviewProvider {
static var previews: some View {
ExperimentalFeaturesView()
}
}
@@ -25,7 +25,6 @@ private enum NetworkAlert: Identifiable {
struct NetworkAndServers: View {
@AppStorage(DEFAULT_DEVELOPER_TOOLS) private var developerTools = false
@AppStorage(GROUP_DEFAULT_XFTP_SEND_ENABLED, store: groupDefaults) private var xftpSendEnabled = false
@State private var cfgLoaded = false
@State private var currentNetCfg = NetCfg.defaults
@State private var netCfg = NetCfg.defaults
@@ -44,13 +43,11 @@ struct NetworkAndServers: View {
Text("SMP servers")
}
if xftpSendEnabled {
NavigationLink {
ProtocolServersView(serverProtocol: .xftp)
.navigationTitle("Your XFTP servers")
} label: {
Text("XFTP servers")
}
NavigationLink {
ProtocolServersView(serverProtocol: .xftp)
.navigationTitle("Your XFTP servers")
} label: {
Text("XFTP servers")
}
Picker("Use .onion hosts", selection: $onionHosts) {
@@ -232,14 +232,6 @@ struct SettingsView: View {
} label: {
settingsRow("info") { Text("About SimpleX Chat") }
}
// NavigationLink {
// MarkdownHelp()
// .padding()
// .navigationTitle("How to use markdown")
// .frame(maxHeight: .infinity, alignment: .top)
// } label: {
// settingsRow("textformat") { Text("Markdown in messages") }
// }
settingsRow("number") {
Button("Send questions and ideas") {
showSettings = false
@@ -278,12 +270,6 @@ struct SettingsView: View {
} label: {
settingsRow("chevron.left.forwardslash.chevron.right") { Text("Developer tools") }
}
// NavigationLink {
// ExperimentalFeaturesView()
// .navigationTitle("Experimental features")
// } label: {
// settingsRow("gauge") { Text("Experimental features") }
// }
NavigationLink {
VersionView()
.navigationBarTitle("App version")
@@ -3357,11 +3357,6 @@ Available in v5.1</source>
<target>Odeslat je z galerie nebo vlastní klávesnice.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Odeslat soubory přes XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Odesílatel zrušil přenos souboru.</target>
@@ -3357,11 +3357,6 @@ Available in v5.1</source>
<target>Senden Sie diese aus dem Fotoalbum oder von individuellen Tastaturen.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Dateien per XFTP versenden</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Der Absender hat die Dateiübertragung abgebrochen.</target>
@@ -3377,11 +3377,6 @@ Available in v5.1</target>
<target>Send them from gallery or custom keyboards.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Send videos and files via XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Sender cancelled file transfer.</target>
@@ -3357,11 +3357,6 @@ Available in v5.1</source>
<target>Envíalos desde la galería o desde teclados personalizados.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Enviar archivos vía XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>El remitente ha cancelado la transferencia de archivos.</target>
@@ -3370,11 +3370,6 @@ Available in v5.1</source>
<target>Envoyez-les depuis la phototèque ou des claviers personnalisés.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Envoi de fichiers via XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>L'expéditeur a annulé le transfert de fichiers.</target>
@@ -3370,11 +3370,6 @@ Available in v5.1</source>
<target>Inviali dalla galleria o dalle tastiere personalizzate.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Invia file tramite XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Il mittente ha annullato il trasferimento del file.</target>
@@ -3377,11 +3377,6 @@ Beschikbaar in v5.1</target>
<target>Stuur ze vanuit de galerij of aangepaste toetsenborden.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Bestanden verzenden via XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Afzender heeft bestandsoverdracht geannuleerd.</target>
@@ -3377,11 +3377,6 @@ Dostępny w v5.1</target>
<target>Wyślij je z galerii lub niestandardowych klawiatur.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Wysyłaj filmy i pliki przez XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Nadawca anulował transfer pliku.</target>
@@ -3377,11 +3377,6 @@ Available in v5.1</source>
<target>Отправьте из галереи или из дополнительных клавиатур.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>Отправлять видео и файлы через XFTP</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>Отправитель отменил передачу файла.</target>
@@ -3357,11 +3357,6 @@ Available in v5.1</source>
<target>发送它们来自图库或自定义键盘。</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send videos and files via XFTP" xml:space="preserve">
<source>Send videos and files via XFTP</source>
<target>通过 XFTP 发送文件</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Sender cancelled file transfer." xml:space="preserve">
<source>Sender cancelled file transfer.</source>
<target>发送人已取消文件传输。</target>
@@ -42,7 +42,6 @@
5C3A88D127DF57800060F1C2 /* FramedItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C3A88D027DF57800060F1C2 /* FramedItemView.swift */; };
5C3F1D562842B68D00EC8A82 /* IntegrityErrorItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C3F1D552842B68D00EC8A82 /* IntegrityErrorItemView.swift */; };
5C3F1D58284363C400EC8A82 /* PrivacySettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C3F1D57284363C400EC8A82 /* PrivacySettings.swift */; };
5C3F1D5A2844B4DE00EC8A82 /* ExperimentalFeaturesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C3F1D592844B4DE00EC8A82 /* ExperimentalFeaturesView.swift */; };
5C4B3B0A285FB130003915F2 /* DatabaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4B3B09285FB130003915F2 /* DatabaseView.swift */; };
5C5346A827B59A6A004DF848 /* ChatHelp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C5346A727B59A6A004DF848 /* ChatHelp.swift */; };
5C55A91F283AD0E400C4E99E /* CallManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C55A91E283AD0E400C4E99E /* CallManager.swift */; };
@@ -276,7 +275,6 @@
5C3A88D027DF57800060F1C2 /* FramedItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FramedItemView.swift; sourceTree = "<group>"; };
5C3F1D552842B68D00EC8A82 /* IntegrityErrorItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntegrityErrorItemView.swift; sourceTree = "<group>"; };
5C3F1D57284363C400EC8A82 /* PrivacySettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacySettings.swift; sourceTree = "<group>"; };
5C3F1D592844B4DE00EC8A82 /* ExperimentalFeaturesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperimentalFeaturesView.swift; sourceTree = "<group>"; };
5C422A7C27A9A6FA0097A1E1 /* SimpleX (iOS).entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SimpleX (iOS).entitlements"; sourceTree = "<group>"; };
5C4B3B09285FB130003915F2 /* DatabaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatabaseView.swift; sourceTree = "<group>"; };
5C5346A727B59A6A004DF848 /* ChatHelp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatHelp.swift; sourceTree = "<group>"; };
@@ -720,7 +718,6 @@
5C93293029239BED0090FFF9 /* ProtocolServerView.swift */,
5C9329402929248A0090FFF9 /* ScanProtocolServer.swift */,
5CB2084E28DA4B4800D024EC /* RTCServers.swift */,
5C3F1D592844B4DE00EC8A82 /* ExperimentalFeaturesView.swift */,
64F1CC3A28B39D8600CD1FB1 /* IncognitoHelp.swift */,
18415845648CA4F5A8BCA272 /* UserProfilesView.swift */,
5C65F341297D3F3600B67AF3 /* VersionView.swift */,
@@ -1165,7 +1162,6 @@
5C93293F2928E0FD0090FFF9 /* AudioRecPlay.swift in Sources */,
5C029EA82837DBB3004A9677 /* CICallItemView.swift in Sources */,
5CE4407227ADB1D0007B033A /* Emoji.swift in Sources */,
5C3F1D5A2844B4DE00EC8A82 /* ExperimentalFeaturesView.swift in Sources */,
5CB2085328DB7CAF00D024EC /* ConnectViaLinkView.swift in Sources */,
5C9CC7A928C532AB00BEF955 /* DatabaseErrorView.swift in Sources */,
5C1A4C1E27A715B700EAD5AD /* ChatItemView.swift in Sources */,
-4
View File
@@ -31,7 +31,6 @@ let GROUP_DEFAULT_STORE_DB_PASSPHRASE = "storeDBPassphrase"
let GROUP_DEFAULT_INITIAL_RANDOM_DB_PASSPHRASE = "initialRandomDBPassphrase"
public let GROUP_DEFAULT_CONFIRM_DB_UPGRADES = "confirmDBUpgrades"
public let GROUP_DEFAULT_CALL_KIT_ENABLED = "callKitEnabled"
public let GROUP_DEFAULT_XFTP_SEND_ENABLED = "xftpSendEnabled"
public let APP_GROUP_NAME = "group.chat.simplex.app"
@@ -56,7 +55,6 @@ public func registerGroupDefaults() {
GROUP_DEFAULT_PRIVACY_TRANSFER_IMAGES_INLINE: false,
GROUP_DEFAULT_CONFIRM_DB_UPGRADES: false,
GROUP_DEFAULT_CALL_KIT_ENABLED: true,
GROUP_DEFAULT_XFTP_SEND_ENABLED: false,
])
}
@@ -129,8 +127,6 @@ public let confirmDBUpgradesGroupDefault = BoolDefault(defaults: groupDefaults,
public let callKitEnabledGroupDefault = BoolDefault(defaults: groupDefaults, forKey: GROUP_DEFAULT_CALL_KIT_ENABLED)
public let xftpSendEnabledGroupDefault = BoolDefault(defaults: groupDefaults, forKey: GROUP_DEFAULT_XFTP_SEND_ENABLED)
public class DateDefault {
var defaults: UserDefaults
var key: String
-3
View File
@@ -2244,9 +2244,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Odeslat je z galerie nebo vlastní klávesnice.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Odeslat soubory přes XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Odesílatel zrušil přenos souboru.";
-3
View File
@@ -2244,9 +2244,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Senden Sie diese aus dem Fotoalbum oder von individuellen Tastaturen.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Dateien per XFTP versenden";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Der Absender hat die Dateiübertragung abgebrochen.";
-3
View File
@@ -2244,9 +2244,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Envíalos desde la galería o desde teclados personalizados.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Enviar archivos vía XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "El remitente ha cancelado la transferencia de archivos.";
-3
View File
@@ -2283,9 +2283,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Envoyez-les depuis la phototèque ou des claviers personnalisés.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Envoi de fichiers via XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "L'expéditeur a annulé le transfert de fichiers.";
-3
View File
@@ -2283,9 +2283,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Inviali dalla galleria o dalle tastiere personalizzate.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Invia file tramite XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Il mittente ha annullato il trasferimento del file.";
-3
View File
@@ -2301,9 +2301,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Stuur ze vanuit de galerij of aangepaste toetsenborden.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Bestanden verzenden via XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Afzender heeft bestandsoverdracht geannuleerd.";
-3
View File
@@ -2301,9 +2301,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Wyślij je z galerii lub niestandardowych klawiatur.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Wysyłaj filmy i pliki przez XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Nadawca anulował transfer pliku.";
-3
View File
@@ -2301,9 +2301,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "Отправьте из галереи или из дополнительных клавиатур.";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "Отправлять видео и файлы через XFTP";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "Отправитель отменил передачу файла.";
@@ -2244,9 +2244,6 @@
/* No comment provided by engineer. */
"Send them from gallery or custom keyboards." = "发送它们来自图库或自定义键盘。";
/* No comment provided by engineer. */
"Send videos and files via XFTP" = "通过 XFTP 发送文件";
/* No comment provided by engineer. */
"Sender cancelled file transfer." = "发送人已取消文件传输。";