Merge branch 'master' into remote-desktop
This commit is contained in:
commit
64f0dbeb61
@ -165,6 +165,8 @@ struct CIRcvDecryptionError: View {
|
||||
message = Text("\(msgCount) messages failed to decrypt.") + Text("\n") + why
|
||||
case .other:
|
||||
message = Text("\(msgCount) messages failed to decrypt.") + Text("\n") + why
|
||||
case .ratchetSync:
|
||||
message = Text("Encryption re-negotiation failed.")
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
@ -2676,6 +2676,7 @@ public enum MsgDecryptError: String, Decodable {
|
||||
case tooManySkipped
|
||||
case ratchetEarlier
|
||||
case other
|
||||
case ratchetSync
|
||||
|
||||
var text: String {
|
||||
switch self {
|
||||
@ -2683,6 +2684,7 @@ public enum MsgDecryptError: String, Decodable {
|
||||
case .tooManySkipped: return NSLocalizedString("Permanent decryption error", comment: "message decrypt error item")
|
||||
case .ratchetEarlier: return NSLocalizedString("Decryption error", comment: "message decrypt error item")
|
||||
case .other: return NSLocalizedString("Decryption error", comment: "message decrypt error item")
|
||||
case .ratchetSync: return NSLocalizedString("Encryption re-negotiation error", comment: "message decrypt error item")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2111,13 +2111,15 @@ enum class MsgDecryptError {
|
||||
@SerialName("ratchetHeader") RatchetHeader,
|
||||
@SerialName("tooManySkipped") TooManySkipped,
|
||||
@SerialName("ratchetEarlier") RatchetEarlier,
|
||||
@SerialName("other") Other;
|
||||
@SerialName("other") Other,
|
||||
@SerialName("ratchetSync") RatchetSync;
|
||||
|
||||
val text: String get() = when (this) {
|
||||
RatchetHeader -> generalGetString(MR.strings.decryption_error)
|
||||
TooManySkipped -> generalGetString(MR.strings.decryption_error)
|
||||
RatchetEarlier -> generalGetString(MR.strings.decryption_error)
|
||||
Other -> generalGetString(MR.strings.decryption_error)
|
||||
RatchetSync -> generalGetString(MR.strings.encryption_renegotiation_error)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -895,7 +895,7 @@ fun BoxWithConstraintsScope.ChatItemsList(
|
||||
|
||||
@Composable
|
||||
fun ChatItemViewShortHand(cItem: ChatItem, range: IntRange?) {
|
||||
ChatItemView(chat.chatInfo, cItem, composeState, provider, useLinkPreviews = useLinkPreviews, linkMode = linkMode, revealed = revealed, range = range, deleteMessage = deleteMessage, deleteMessages = deleteMessages, receiveFile = receiveFile, cancelFile = cancelFile, joinGroup = { _, _ -> }, acceptCall = acceptCall, acceptFeature = acceptFeature, openDirectChat = openDirectChat, updateContactStats = updateContactStats, updateMemberStats = updateMemberStats, syncContactConnection = syncContactConnection, syncMemberConnection = syncMemberConnection, findModelChat = findModelChat, findModelMember = findModelMember, scrollToItem = scrollToItem, setReaction = setReaction, showItemDetails = showItemDetails, developerTools = developerTools)
|
||||
ChatItemView(chat.chatInfo, cItem, composeState, provider, useLinkPreviews = useLinkPreviews, linkMode = linkMode, revealed = revealed, range = range, deleteMessage = deleteMessage, deleteMessages = deleteMessages, receiveFile = receiveFile, cancelFile = cancelFile, joinGroup = joinGroup, acceptCall = acceptCall, acceptFeature = acceptFeature, openDirectChat = openDirectChat, updateContactStats = updateContactStats, updateMemberStats = updateMemberStats, syncContactConnection = syncContactConnection, syncMemberConnection = syncMemberConnection, findModelChat = findModelChat, findModelMember = findModelMember, scrollToItem = scrollToItem, setReaction = setReaction, showItemDetails = showItemDetails, developerTools = developerTools)
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
@ -218,5 +218,7 @@ private fun alertMessage(msgDecryptError: MsgDecryptError, msgCount: UInt): Stri
|
||||
|
||||
MsgDecryptError.Other -> String.format(generalGetString(MR.strings.alert_text_decryption_error_n_messages_failed_to_decrypt), msgCount.toLong()) + "\n" +
|
||||
generalGetString(MR.strings.alert_text_fragment_encryption_out_of_sync_old_database)
|
||||
|
||||
MsgDecryptError.RatchetSync -> generalGetString(MR.strings.alert_text_encryption_renegotiation_failed)
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,7 @@
|
||||
<string name="invalid_chat">invalid chat</string>
|
||||
<string name="invalid_data">invalid data</string>
|
||||
<string name="decryption_error">Decryption error</string>
|
||||
<string name="encryption_renegotiation_error">Encryption re-negotiation error</string>
|
||||
|
||||
<!-- PendingContactConnection - ChatModel.kt -->
|
||||
<string name="connection_local_display_name">connection %1$d</string>
|
||||
@ -866,6 +867,7 @@
|
||||
<string name="alert_text_decryption_error_n_messages_failed_to_decrypt">%1$d messages failed to decrypt.</string>
|
||||
<string name="alert_text_decryption_error_too_many_skipped">%1$d messages skipped.</string>
|
||||
<string name="alert_text_fragment_encryption_out_of_sync_old_database">It can happen when you or your connection used the old database backup.</string>
|
||||
<string name="alert_text_encryption_renegotiation_failed">Encryption re-negotiation failed.</string>
|
||||
<string name="alert_text_fragment_please_report_to_developers">Please report it to the developers.</string>
|
||||
|
||||
<!-- Privacy settings -->
|
||||
|
Loading…
Reference in New Issue
Block a user