mobile: remove option "transfer images faster" (#1891)
This commit is contained in:
committed by
GitHub
parent
958299784d
commit
06a2f7e4da
@@ -636,13 +636,12 @@ func apiChatUnread(type: ChatType, id: Int64, unreadChat: Bool) async throws {
|
||||
}
|
||||
|
||||
func receiveFile(user: User, fileId: Int64) async {
|
||||
let inline = privacyTransferImagesInlineGroupDefault.get()
|
||||
if let chatItem = await apiReceiveFile(fileId: fileId, inline: inline) {
|
||||
if let chatItem = await apiReceiveFile(fileId: fileId) {
|
||||
DispatchQueue.main.async { chatItemSimpleUpdate(user, chatItem) }
|
||||
}
|
||||
}
|
||||
|
||||
func apiReceiveFile(fileId: Int64, inline: Bool) async -> AChatItem? {
|
||||
func apiReceiveFile(fileId: Int64, inline: Bool? = nil) async -> AChatItem? {
|
||||
let r = await chatSendCmd(.receiveFile(fileId: fileId, inline: inline))
|
||||
let am = AlertManager.shared
|
||||
if case let .rcvFileAccepted(_, chatItem) = r { return chatItem }
|
||||
|
||||
@@ -13,7 +13,6 @@ struct PrivacySettings: View {
|
||||
@AppStorage(DEFAULT_PRIVACY_ACCEPT_IMAGES) private var autoAcceptImages = true
|
||||
@AppStorage(DEFAULT_PRIVACY_LINK_PREVIEWS) private var useLinkPreviews = true
|
||||
@AppStorage(DEFAULT_DEVELOPER_TOOLS) private var developerTools = false
|
||||
@AppStorage(GROUP_DEFAULT_PRIVACY_TRANSFER_IMAGES_INLINE, store: groupDefaults) private var transferImagesInline = false
|
||||
@State private var simplexLinkMode = privacySimplexLinkModeDefault.get()
|
||||
@AppStorage(DEFAULT_PRIVACY_PROTECT_SCREEN) private var protectScreen = false
|
||||
|
||||
@@ -34,9 +33,6 @@ struct PrivacySettings: View {
|
||||
privacyAcceptImagesGroupDefault.set($0)
|
||||
}
|
||||
}
|
||||
settingsRow("photo.on.rectangle") {
|
||||
Toggle("Transfer images inline (BETA)", isOn: $transferImagesInline)
|
||||
}
|
||||
settingsRow("network") {
|
||||
Toggle("Send link previews", isOn: $useLinkPreviews)
|
||||
}
|
||||
|
||||
@@ -3297,11 +3297,6 @@ Sie werden aufgefordert, die Authentifizierung abzuschließen, bevor diese Funkt
|
||||
<target>Um die Ende-zu-Ende-Verschlüsselung mit Ihrem Kontakt zu überprüfen, müssen Sie den Sicherheitscode in Ihren Apps vergleichen oder scannen.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transfer images inline (BETA)" xml:space="preserve">
|
||||
<source>Transfer images inline (BETA)</source>
|
||||
<target>Bilder schneller übertragen (BETA)</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transport isolation" xml:space="preserve">
|
||||
<source>Transport isolation</source>
|
||||
<target>Transport-Isolation</target>
|
||||
|
||||
@@ -3297,11 +3297,6 @@ You will be prompted to complete authentication before this feature is enabled.<
|
||||
<target>To verify end-to-end encryption with your contact compare (or scan) the code on your devices.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transfer images inline (BETA)" xml:space="preserve">
|
||||
<source>Transfer images inline (BETA)</source>
|
||||
<target>Transfer images inline (BETA)</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transport isolation" xml:space="preserve">
|
||||
<source>Transport isolation</source>
|
||||
<target>Transport isolation</target>
|
||||
|
||||
@@ -3284,11 +3284,6 @@ Vous serez invité à confirmer l'authentification avant que cette fonction ne s
|
||||
<target>Pour vérifier le chiffrement de bout en bout avec votre contact, comparez (ou scannez) le code sur vos appareils.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transfer images inline (BETA)" xml:space="preserve">
|
||||
<source>Transfer images inline (BETA)</source>
|
||||
<target>Transfert d'images plus rapide (BETA)</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transport isolation" xml:space="preserve">
|
||||
<source>Transport isolation</source>
|
||||
<target>Isolement du transport</target>
|
||||
|
||||
@@ -3297,11 +3297,6 @@ Ti verrà chiesto di completare l'autenticazione prima di attivare questa funzio
|
||||
<target>Per verificare la crittografia end-to-end con il tuo contatto, confrontate (o scansionate) il codice sui vostri dispositivi.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transfer images inline (BETA)" xml:space="preserve">
|
||||
<source>Transfer images inline (BETA)</source>
|
||||
<target>Trasferisci immagini più velocemente (BETA)</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transport isolation" xml:space="preserve">
|
||||
<source>Transport isolation</source>
|
||||
<target>Isolamento del trasporto</target>
|
||||
|
||||
@@ -3297,11 +3297,6 @@ You will be prompted to complete authentication before this feature is enabled.<
|
||||
<target>Чтобы подтвердить end-to-end шифрование с вашим контактом сравните (или сканируйте) код безопасности на ваших устройствах.</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transfer images inline (BETA)" xml:space="preserve">
|
||||
<source>Transfer images inline (BETA)</source>
|
||||
<target>Передавать изображения в том же соединении0 (БЕТА)</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Transport isolation" xml:space="preserve">
|
||||
<source>Transport isolation</source>
|
||||
<target>Отдельные сессии для</target>
|
||||
|
||||
@@ -225,16 +225,14 @@ func receivedMsgNtf(_ res: ChatResponse) async -> (String, UNMutableNotification
|
||||
if let file = cItem.file,
|
||||
file.fileSize <= MAX_IMAGE_SIZE_AUTO_RCV,
|
||||
privacyAcceptImagesGroupDefault.get() {
|
||||
let inline = privacyTransferImagesInlineGroupDefault.get()
|
||||
cItem = apiReceiveFile(fileId: file.fileId, inline: inline)?.chatItem ?? cItem
|
||||
cItem = apiReceiveFile(fileId: file.fileId)?.chatItem ?? cItem
|
||||
}
|
||||
} else if case .voice = cItem.content.msgContent { // TODO check inlineFileMode != IFMSent
|
||||
if let file = cItem.file,
|
||||
file.fileSize <= MAX_IMAGE_SIZE,
|
||||
file.fileSize > MAX_VOICE_MESSAGE_SIZE_INLINE_SEND,
|
||||
privacyAcceptImagesGroupDefault.get() {
|
||||
let inline = privacyTransferImagesInlineGroupDefault.get()
|
||||
cItem = apiReceiveFile(fileId: file.fileId, inline: inline)?.chatItem ?? cItem
|
||||
cItem = apiReceiveFile(fileId: file.fileId)?.chatItem ?? cItem
|
||||
}
|
||||
}
|
||||
return cItem.showMutableNotification ? (aChatItem.chatId, createMessageReceivedNtf(user, cInfo, cItem)) : nil
|
||||
@@ -308,7 +306,7 @@ func apiGetNtfMessage(nonce: String, encNtfInfo: String) -> NtfMessages? {
|
||||
return nil
|
||||
}
|
||||
|
||||
func apiReceiveFile(fileId: Int64, inline: Bool) -> AChatItem? {
|
||||
func apiReceiveFile(fileId: Int64, inline: Bool? = nil) -> AChatItem? {
|
||||
let r = sendSimpleXCmd(.receiveFile(fileId: fileId, inline: inline))
|
||||
if case let .rcvFileAccepted(_, chatItem) = r { return chatItem }
|
||||
logger.error("receiveFile error: \(responseError(r))")
|
||||
|
||||
@@ -91,7 +91,7 @@ public enum ChatCommand {
|
||||
case apiCallStatus(contact: Contact, callStatus: WebRTCCallStatus)
|
||||
case apiChatRead(type: ChatType, id: Int64, itemRange: (Int64, Int64))
|
||||
case apiChatUnread(type: ChatType, id: Int64, unreadChat: Bool)
|
||||
case receiveFile(fileId: Int64, inline: Bool)
|
||||
case receiveFile(fileId: Int64, inline: Bool?)
|
||||
case showVersion
|
||||
case string(String)
|
||||
|
||||
@@ -180,7 +180,11 @@ public enum ChatCommand {
|
||||
case let .apiCallStatus(contact, callStatus): return "/_call status @\(contact.apiId) \(callStatus.rawValue)"
|
||||
case let .apiChatRead(type, id, itemRange: (from, to)): return "/_read chat \(ref(type, id)) from=\(from) to=\(to)"
|
||||
case let .apiChatUnread(type, id, unreadChat): return "/_unread chat \(ref(type, id)) \(onOff(unreadChat))"
|
||||
case let .receiveFile(fileId, inline): return "/freceive \(fileId) inline=\(onOff(inline))"
|
||||
case let .receiveFile(fileId, inline):
|
||||
if let inline = inline {
|
||||
return "/freceive \(fileId) inline=\(onOff(inline))"
|
||||
}
|
||||
return "/freceive \(fileId)"
|
||||
case .showVersion: return "/version"
|
||||
case let .string(str): return str
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ let GROUP_DEFAULT_DB_CONTAINER = "dbContainer"
|
||||
public let GROUP_DEFAULT_CHAT_LAST_START = "chatLastStart"
|
||||
let GROUP_DEFAULT_NTF_PREVIEW_MODE = "ntfPreviewMode"
|
||||
let GROUP_DEFAULT_PRIVACY_ACCEPT_IMAGES = "privacyAcceptImages"
|
||||
public let GROUP_DEFAULT_PRIVACY_TRANSFER_IMAGES_INLINE = "privacyTransferImagesInline"
|
||||
public let GROUP_DEFAULT_PRIVACY_TRANSFER_IMAGES_INLINE = "privacyTransferImagesInline" // no longer used
|
||||
let GROUP_DEFAULT_NTF_BADGE_COUNT = "ntgBadgeCount"
|
||||
let GROUP_DEFAULT_NETWORK_USE_ONION_HOSTS = "networkUseOnionHosts"
|
||||
let GROUP_DEFAULT_NETWORK_SESSION_MODE = "networkSessionMode"
|
||||
|
||||
@@ -2250,9 +2250,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"To verify end-to-end encryption with your contact compare (or scan) the code on your devices." = "Um die Ende-zu-Ende-Verschlüsselung mit Ihrem Kontakt zu überprüfen, müssen Sie den Sicherheitscode in Ihren Apps vergleichen oder scannen.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transfer images inline (BETA)" = "Bilder schneller übertragen (BETA)";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transport isolation" = "Transport-Isolation";
|
||||
|
||||
|
||||
@@ -2211,9 +2211,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"To verify end-to-end encryption with your contact compare (or scan) the code on your devices." = "Pour vérifier le chiffrement de bout en bout avec votre contact, comparez (ou scannez) le code sur vos appareils.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transfer images inline (BETA)" = "Transfert d'images plus rapide (BETA)";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transport isolation" = "Isolement du transport";
|
||||
|
||||
|
||||
@@ -2250,9 +2250,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"To verify end-to-end encryption with your contact compare (or scan) the code on your devices." = "Per verificare la crittografia end-to-end con il tuo contatto, confrontate (o scansionate) il codice sui vostri dispositivi.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transfer images inline (BETA)" = "Trasferisci immagini più velocemente (BETA)";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transport isolation" = "Isolamento del trasporto";
|
||||
|
||||
|
||||
@@ -2250,9 +2250,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"To verify end-to-end encryption with your contact compare (or scan) the code on your devices." = "Чтобы подтвердить end-to-end шифрование с вашим контактом сравните (или сканируйте) код безопасности на ваших устройствах.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transfer images inline (BETA)" = "Передавать изображения в том же соединении0 (БЕТА)";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Transport isolation" = "Отдельные сессии для";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user