ios: create contacts with group members (#3077)

* wip

* observed

* network status

* contact ready

* add padding

* Update apps/ios/Shared/Views/Chat/ComposeMessage/ContextInvitingContactMemberView.swift

* setContactNetworkStatus

* update text

* different context view

* update text, icon

* spinner

* reload all chats on swipe

* Revert "reload all chats on swipe"

This reverts commit 22c8372301.

* export localizations

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
spaced4ndy 2023-09-20 12:26:16 +04:00 committed by GitHub
parent 1928256b09
commit 0dab4491e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 769 additions and 146 deletions

View File

@ -15,6 +15,12 @@ import SimpleXChat
private var chatController: chat_ctrl?
// currentChatVersion in core
public let CURRENT_CHAT_VERSION: Int = 2
// version range that supports establishing direct connection with a group member (xGrpDirectInvVRange in core)
public let CREATE_MEMBER_CONTACT_VRANGE = VersionRange(minVersion: 2, maxVersion: CURRENT_CHAT_VERSION)
enum TerminalItem: Identifiable {
case cmd(Date, ChatCommand)
case resp(Date, ChatResponse)
@ -1090,6 +1096,18 @@ func apiGetGroupLink(_ groupId: Int64) throws -> (String, GroupMemberRole)? {
}
}
func apiCreateMemberContact(_ groupId: Int64, _ groupMemberId: Int64) async throws -> Contact {
let r = await chatSendCmd(.apiCreateMemberContact(groupId: groupId, groupMemberId: groupMemberId))
if case let .newMemberContact(_, contact, _, _) = r { return contact }
throw r
}
func apiSendMemberContactInvitation(_ contactId: Int64, _ msg: MsgContent) async throws -> Contact {
let r = await chatSendCmd(.apiSendMemberContactInvitation(contactId: contactId, msg: msg), bgDelay: msgDelay)
if case let .newMemberContactSentInv(_, contact, _, _) = r { return contact }
throw r
}
func apiGetVersion() throws -> CoreVersionInfo {
let r = chatSendCmdSync(.showVersion)
if case let .versionInfo(info, _, _) = r { return info }
@ -1487,6 +1505,12 @@ func processReceivedMsg(_ res: ChatResponse) async {
m.updateGroup(groupInfo)
}
}
case let .newMemberContactReceivedInv(user, contact, _, _):
if active(user) {
await MainActor.run {
m.updateContact(contact)
}
}
case let .rcvFileAccepted(user, aChatItem): // usually rcvFileAccepted is a response, but it's also an event for XFTP files auto-accepted from NSE
await chatItemSimpleUpdate(user, aChatItem)
case let .rcvFileStart(user, aChatItem):

View File

@ -164,6 +164,7 @@ struct ChatInfoView: View {
// synchronizeConnectionButtonForce()
// }
}
.disabled(!contact.ready)
if let contactLink = contact.contactLink {
Section {
@ -180,30 +181,33 @@ struct ChatInfoView: View {
}
}
Section("Servers") {
networkStatusRow()
.onTapGesture {
alert = .networkStatusAlert
}
if let connStats = connectionStats {
Button("Change receiving address") {
alert = .switchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil }
|| connStats.ratchetSyncSendProhibited
)
if connStats.rcvQueuesInfo.contains(where: { $0.rcvSwitchStatus != nil }) {
Button("Abort changing address") {
alert = .abortSwitchAddressAlert
if contact.ready {
Section("Servers") {
networkStatusRow()
.onTapGesture {
alert = .networkStatusAlert
}
if let connStats = connectionStats {
Button("Change receiving address") {
alert = .switchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil && !$0.canAbortSwitch }
!contact.ready
|| connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil }
|| connStats.ratchetSyncSendProhibited
)
if connStats.rcvQueuesInfo.contains(where: { $0.rcvSwitchStatus != nil }) {
Button("Abort changing address") {
alert = .abortSwitchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil && !$0.canAbortSwitch }
|| connStats.ratchetSyncSendProhibited
)
}
smpServers("Receiving via", connStats.rcvQueuesInfo.map { $0.rcvServer })
smpServers("Sending via", connStats.sndQueuesInfo.map { $0.sndServer })
}
smpServers("Receiving via", connStats.rcvQueuesInfo.map { $0.rcvServer })
smpServers("Sending via", connStats.sndQueuesInfo.map { $0.sndServer })
}
}

View File

@ -0,0 +1,79 @@
//
// CIMemberCreatedContactView.swift
// SimpleX (iOS)
//
// Created by spaced4ndy on 19.09.2023.
// Copyright © 2023 SimpleX Chat. All rights reserved.
//
import SwiftUI
import SimpleXChat
struct CIMemberCreatedContactView: View {
var chatItem: ChatItem
var body: some View {
HStack(alignment: .bottom, spacing: 0) {
switch chatItem.chatDir {
case let .groupRcv(groupMember):
if let contactId = groupMember.memberContactId {
memberCreatedContactView(openText: "Open")
.onTapGesture {
dismissAllSheets(animated: true)
DispatchQueue.main.async {
ChatModel.shared.chatId = "@\(contactId)"
}
}
} else {
memberCreatedContactView()
}
default:
EmptyView()
}
}
.padding(.leading, 6)
.padding(.bottom, 6)
.textSelection(.disabled)
}
private func memberCreatedContactView(openText: LocalizedStringKey? = nil) -> some View {
var r = eventText()
if let openText {
r = r
+ Text(openText)
.fontWeight(.medium)
.foregroundColor(.accentColor)
+ Text(" ")
}
r = r + chatItem.timestampText
.fontWeight(.light)
.foregroundColor(.secondary)
return r.font(.caption)
}
private func eventText() -> Text {
if let member = chatItem.memberDisplayName {
return Text(member + " " + chatItem.content.text + " ")
.fontWeight(.light)
.foregroundColor(.secondary)
} else {
return Text(chatItem.content.text + " ")
.fontWeight(.light)
.foregroundColor(.secondary)
}
}
}
struct CIMemberCreatedContactView_Previews: PreviewProvider {
static var previews: some View {
let content = CIContent.rcvGroupEvent(rcvGroupEvent: .memberCreatedContact)
let chatItem = ChatItem(
chatDir: .groupRcv(groupMember: GroupMember.sampleData),
meta: CIMeta.getSample(1, .now, content.text, .rcvRead),
content: content,
quotedItem: nil,
file: nil
)
CIMemberCreatedContactView(chatItem: chatItem)
}
}

View File

@ -74,6 +74,7 @@ struct ChatItemContentView<Content: View>: View {
case let .rcvGroupInvitation(groupInvitation, memberRole): groupInvitationItemView(groupInvitation, memberRole)
case let .sndGroupInvitation(groupInvitation, memberRole): groupInvitationItemView(groupInvitation, memberRole)
case .rcvGroupEvent(.memberConnected): CIEventView(eventText: membersConnectedItemText)
case .rcvGroupEvent(.memberCreatedContact): CIMemberCreatedContactView(chatItem: chatItem)
case .rcvGroupEvent: eventItemView()
case .sndGroupEvent: eventItemView()
case .rcvConnEvent: eventItemView()

View File

@ -64,6 +64,7 @@ struct ChatView: View {
Spacer(minLength: 0)
connectingText()
ComposeView(
chat: chat,
composeState: $composeState,
@ -149,6 +150,7 @@ struct ChatView: View {
HStack {
if contact.allowsFeature(.calls) {
callButton(contact, .audio, imageName: "phone")
.disabled(!contact.ready)
}
Menu {
if contact.allowsFeature(.calls) {
@ -157,9 +159,11 @@ struct ChatView: View {
} label: {
Label("Video call", systemImage: "video")
}
.disabled(!contact.ready)
}
searchButton()
toggleNtfsButton(chat)
.disabled(!contact.ready)
} label: {
Image(systemName: "ellipsis")
}
@ -313,6 +317,19 @@ struct ChatView: View {
}
.scaleEffect(x: 1, y: -1, anchor: .center)
}
@ViewBuilder private func connectingText() -> some View {
if case let .direct(contact) = chat.chatInfo,
!contact.ready,
!contact.nextSendGrpInv {
Text("connecting…")
.font(.caption)
.foregroundColor(.secondary)
.padding(.top)
} else {
EmptyView()
}
}
private func floatingButtons(_ proxy: ScrollViewProxy) -> some View {
let counts = chatModel.unreadChatItemCounts(itemsInView: itemsInView)

View File

@ -257,6 +257,9 @@ struct ComposeView: View {
var body: some View {
VStack(spacing: 0) {
if chat.chatInfo.contact?.nextSendGrpInv ?? false {
ContextInvitingContactMemberView()
}
contextItemView()
switch (composeState.editing, composeState.preview) {
case (true, .filePreview): EmptyView()
@ -270,7 +273,7 @@ struct ComposeView: View {
Image(systemName: "paperclip")
.resizable()
}
.disabled(composeState.attachmentDisabled || !chat.userCanSend)
.disabled(composeState.attachmentDisabled || !chat.userCanSend || (chat.chatInfo.contact?.nextSendGrpInv ?? false))
.frame(width: 25, height: 25)
.padding(.bottom, 12)
.padding(.leading, 12)
@ -298,6 +301,7 @@ struct ComposeView: View {
composeState.liveMessage = nil
chatModel.removeLiveDummy()
},
nextSendGrpInv: chat.chatInfo.contact?.nextSendGrpInv ?? false,
voiceMessageAllowed: chat.chatInfo.featureEnabled(.voice),
showEnableVoiceMessagesAlert: chat.chatInfo.showEnableVoiceMessagesAlert,
startVoiceMessageRecording: {
@ -617,7 +621,9 @@ struct ComposeView: View {
if liveMessage != nil { composeState = composeState.copy(liveMessage: nil) }
await sending()
}
if case let .editingItem(ci) = composeState.contextItem {
if chat.chatInfo.contact?.nextSendGrpInv ?? false {
await sendMemberContactInvitation()
} else if case let .editingItem(ci) = composeState.contextItem {
sent = await updateMessage(ci, live: live)
} else if let liveMessage = liveMessage, liveMessage.sentMsg != nil {
sent = await updateMessage(liveMessage.chatItem, live: live)
@ -669,6 +675,19 @@ struct ComposeView: View {
await MainActor.run { composeState.inProgress = true }
}
func sendMemberContactInvitation() async {
do {
let mc = checkLinkPreview()
let contact = try await apiSendMemberContactInvitation(chat.chatInfo.apiId, mc)
await MainActor.run {
self.chatModel.updateContact(contact)
}
} catch {
logger.error("ChatView.sendMemberContactInvitation error: \(error.localizedDescription)")
AlertManager.shared.showAlertMsg(title: "Error sending member contact invitation", message: "Error: \(responseError(error))")
}
}
func updateMessage(_ ei: ChatItem, live: Bool) async -> ChatItem? {
if let oldMsgContent = ei.content.msgContent {
do {

View File

@ -0,0 +1,32 @@
//
// ContextInvitingContactMemberView.swift
// SimpleX (iOS)
//
// Created by spaced4ndy on 18.09.2023.
// Copyright © 2023 SimpleX Chat. All rights reserved.
//
import SwiftUI
struct ContextInvitingContactMemberView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View {
HStack {
Image(systemName: "message")
.foregroundColor(.secondary)
Text("Send direct message to connect")
}
.padding(12)
.frame(minHeight: 50)
.frame(maxWidth: .infinity, alignment: .leading)
.background(colorScheme == .light ? sentColorLight : sentColorDark)
.padding(.top, 8)
}
}
struct ContextInvitingContactMemberView_Previews: PreviewProvider {
static var previews: some View {
ContextInvitingContactMemberView()
}
}

View File

@ -17,6 +17,7 @@ struct SendMessageView: View {
var sendLiveMessage: (() async -> Void)? = nil
var updateLiveMessage: (() async -> Void)? = nil
var cancelLiveMessage: (() -> Void)? = nil
var nextSendGrpInv: Bool = false
var showVoiceMessageButton: Bool = true
var voiceMessageAllowed: Bool = true
var showEnableVoiceMessagesAlert: ChatInfo.ShowEnableVoiceMessagesAlert = .other
@ -118,7 +119,9 @@ struct SendMessageView: View {
@ViewBuilder private func composeActionButtons() -> some View {
let vmrs = composeState.voiceMessageRecordingState
if showVoiceMessageButton
if nextSendGrpInv {
inviteMemberContactButton()
} else if showVoiceMessageButton
&& composeState.message.isEmpty
&& !composeState.editing
&& composeState.liveMessage == nil
@ -162,6 +165,24 @@ struct SendMessageView: View {
.padding([.top, .trailing], 4)
}
private func inviteMemberContactButton() -> some View {
Button {
sendMessage(nil)
} label: {
Image(systemName: "arrow.up.circle.fill")
.resizable()
.foregroundColor(sendButtonColor)
.frame(width: sendButtonSize, height: sendButtonSize)
.opacity(sendButtonOpacity)
}
.disabled(
!composeState.sendEnabled ||
composeState.inProgress
)
.frame(width: 29, height: 29)
.padding([.bottom, .trailing], 4)
}
private func sendMessageButton() -> some View {
Button {
sendMessage(nil)

View File

@ -22,6 +22,7 @@ struct GroupMemberInfoView: View {
@State private var connectToMemberDialog: Bool = false
@AppStorage(DEFAULT_DEVELOPER_TOOLS) private var developerTools = false
@State private var justOpened = true
@State private var progressIndicator = false
enum GroupMemberInfoViewAlert: Identifiable {
case removeMemberAlert(mem: GroupMember)
@ -65,146 +66,154 @@ struct GroupMemberInfoView: View {
}
private func groupMemberInfoView() -> some View {
VStack {
List {
groupMemberInfoHeader(member)
.listRowBackground(Color.clear)
ZStack {
VStack {
List {
groupMemberInfoHeader(member)
.listRowBackground(Color.clear)
if member.memberActive {
Section {
if let contactId = member.memberContactId {
if let chat = knownDirectChat(contactId) {
if member.memberActive {
Section {
if let contactId = member.memberContactId, let chat = knownDirectChat(contactId) {
knownDirectChatButton(chat)
} else if groupInfo.fullGroupPreferences.directMessages.on {
newDirectChatButton(contactId)
if let contactId = member.memberContactId {
newDirectChatButton(contactId)
} else if member.activeConn?.peerChatVRange.isCompatibleRange(CREATE_MEMBER_CONTACT_VRANGE) ?? false {
createMemberContactButton()
}
}
if let code = connectionCode { verifyCodeButton(code) }
if let connStats = connectionStats,
connStats.ratchetSyncAllowed {
synchronizeConnectionButton()
}
// } else if developerTools {
// synchronizeConnectionButtonForce()
// }
}
if let code = connectionCode { verifyCodeButton(code) }
if let connStats = connectionStats,
connStats.ratchetSyncAllowed {
synchronizeConnectionButton()
}
// } else if developerTools {
// synchronizeConnectionButtonForce()
// }
}
}
if let contactLink = member.contactLink {
Section {
QRCode(uri: contactLink)
Button {
showShareSheet(items: [contactLink])
} label: {
Label("Share address", systemImage: "square.and.arrow.up")
}
if let contactId = member.memberContactId {
if knownDirectChat(contactId) == nil && !groupInfo.fullGroupPreferences.directMessages.on {
if let contactLink = member.contactLink {
Section {
QRCode(uri: contactLink)
Button {
showShareSheet(items: [contactLink])
} label: {
Label("Share address", systemImage: "square.and.arrow.up")
}
if let contactId = member.memberContactId {
if knownDirectChat(contactId) == nil && !groupInfo.fullGroupPreferences.directMessages.on {
connectViaAddressButton(contactLink)
}
} else {
connectViaAddressButton(contactLink)
}
} else {
connectViaAddressButton(contactLink)
} header: {
Text("Address")
} footer: {
Text("You can share this address with your contacts to let them connect with **\(member.displayName)**.")
}
} header: {
Text("Address")
} footer: {
Text("You can share this address with your contacts to let them connect with **\(member.displayName)**.")
}
}
Section("Member") {
infoRow("Group", groupInfo.displayName)
Section("Member") {
infoRow("Group", groupInfo.displayName)
if let roles = member.canChangeRoleTo(groupInfo: groupInfo) {
Picker("Change role", selection: $newRole) {
ForEach(roles) { role in
Text(role.text)
if let roles = member.canChangeRoleTo(groupInfo: groupInfo) {
Picker("Change role", selection: $newRole) {
ForEach(roles) { role in
Text(role.text)
}
}
.frame(height: 36)
} else {
infoRow("Role", member.memberRole.text)
}
// TODO invited by - need to get contact by contact id
if let conn = member.activeConn {
let connLevelDesc = conn.connLevel == 0 ? NSLocalizedString("direct", comment: "connection level description") : String.localizedStringWithFormat(NSLocalizedString("indirect (%d)", comment: "connection level description"), conn.connLevel)
infoRow("Connection", connLevelDesc)
}
.frame(height: 36)
} else {
infoRow("Role", member.memberRole.text)
}
// TODO invited by - need to get contact by contact id
if let conn = member.activeConn {
let connLevelDesc = conn.connLevel == 0 ? NSLocalizedString("direct", comment: "connection level description") : String.localizedStringWithFormat(NSLocalizedString("indirect (%d)", comment: "connection level description"), conn.connLevel)
infoRow("Connection", connLevelDesc)
}
}
if let connStats = connectionStats {
Section("Servers") {
// TODO network connection status
Button("Change receiving address") {
alert = .switchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil }
|| connStats.ratchetSyncSendProhibited
)
if connStats.rcvQueuesInfo.contains(where: { $0.rcvSwitchStatus != nil }) {
Button("Abort changing address") {
alert = .abortSwitchAddressAlert
if let connStats = connectionStats {
Section("Servers") {
// TODO network connection status
Button("Change receiving address") {
alert = .switchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil && !$0.canAbortSwitch }
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil }
|| connStats.ratchetSyncSendProhibited
)
if connStats.rcvQueuesInfo.contains(where: { $0.rcvSwitchStatus != nil }) {
Button("Abort changing address") {
alert = .abortSwitchAddressAlert
}
.disabled(
connStats.rcvQueuesInfo.contains { $0.rcvSwitchStatus != nil && !$0.canAbortSwitch }
|| connStats.ratchetSyncSendProhibited
)
}
smpServers("Receiving via", connStats.rcvQueuesInfo.map { $0.rcvServer })
smpServers("Sending via", connStats.sndQueuesInfo.map { $0.sndServer })
}
smpServers("Receiving via", connStats.rcvQueuesInfo.map { $0.rcvServer })
smpServers("Sending via", connStats.sndQueuesInfo.map { $0.sndServer })
}
}
if member.canBeRemoved(groupInfo: groupInfo) {
Section {
removeMemberButton(member)
if member.canBeRemoved(groupInfo: groupInfo) {
Section {
removeMemberButton(member)
}
}
}
if developerTools {
Section("For console") {
infoRow("Local name", member.localDisplayName)
infoRow("Database ID", "\(member.groupMemberId)")
if developerTools {
Section("For console") {
infoRow("Local name", member.localDisplayName)
infoRow("Database ID", "\(member.groupMemberId)")
}
}
}
.navigationBarHidden(true)
.onAppear {
if #unavailable(iOS 16) {
// this condition prevents re-setting picker
if !justOpened { return }
}
newRole = member.memberRole
do {
let (_, stats) = try apiGroupMemberInfo(groupInfo.apiId, member.groupMemberId)
let (mem, code) = member.memberActive ? try apiGetGroupMemberCode(groupInfo.apiId, member.groupMemberId) : (member, nil)
member = mem
connectionStats = stats
connectionCode = code
} catch let error {
logger.error("apiGroupMemberInfo or apiGetGroupMemberCode error: \(responseError(error))")
}
justOpened = false
}
.onChange(of: newRole) { _ in
if newRole != member.memberRole {
alert = .changeMemberRoleAlert(mem: member, role: newRole)
}
}
}
.navigationBarHidden(true)
.onAppear {
if #unavailable(iOS 16) {
// this condition prevents re-setting picker
if !justOpened { return }
}
newRole = member.memberRole
do {
let (_, stats) = try apiGroupMemberInfo(groupInfo.apiId, member.groupMemberId)
let (mem, code) = member.memberActive ? try apiGetGroupMemberCode(groupInfo.apiId, member.groupMemberId) : (member, nil)
member = mem
connectionStats = stats
connectionCode = code
} catch let error {
logger.error("apiGroupMemberInfo or apiGetGroupMemberCode error: \(responseError(error))")
}
justOpened = false
}
.onChange(of: newRole) { _ in
if newRole != member.memberRole {
alert = .changeMemberRoleAlert(mem: member, role: newRole)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
.alert(item: $alert) { alertItem in
switch(alertItem) {
case let .removeMemberAlert(mem): return removeMemberAlert(mem)
case let .changeMemberRoleAlert(mem, _): return changeMemberRoleAlert(mem)
case .switchAddressAlert: return switchAddressAlert(switchMemberAddress)
case .abortSwitchAddressAlert: return abortSwitchAddressAlert(abortSwitchMemberAddress)
case .syncConnectionForceAlert: return syncConnectionForceAlert({ syncMemberConnection(force: true) })
case let .connRequestSentAlert(type): return connReqSentAlert(type)
case let .error(title, error): return Alert(title: Text(title), message: Text(error))
case let .other(alert): return alert
}
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
.alert(item: $alert) { alertItem in
switch(alertItem) {
case let .removeMemberAlert(mem): return removeMemberAlert(mem)
case let .changeMemberRoleAlert(mem, _): return changeMemberRoleAlert(mem)
case .switchAddressAlert: return switchAddressAlert(switchMemberAddress)
case .abortSwitchAddressAlert: return abortSwitchAddressAlert(abortSwitchMemberAddress)
case .syncConnectionForceAlert: return syncConnectionForceAlert({ syncMemberConnection(force: true) })
case let .connRequestSentAlert(type): return connReqSentAlert(type)
case let .error(title, error): return Alert(title: Text(title), message: Text(error))
case let .other(alert): return alert
if progressIndicator {
ProgressView().scaleEffect(2)
}
}
}
@ -260,6 +269,33 @@ struct GroupMemberInfoView: View {
}
}
func createMemberContactButton() -> some View {
Button {
progressIndicator = true
Task {
do {
let memberContact = try await apiCreateMemberContact(groupInfo.apiId, member.groupMemberId)
await MainActor.run {
progressIndicator = false
chatModel.addChat(Chat(chatInfo: .direct(contact: memberContact)))
dismissAllSheets(animated: true)
chatModel.chatId = memberContact.id
chatModel.setContactNetworkStatus(memberContact, .connected)
}
} catch let error {
logger.error("createMemberContactButton apiCreateMemberContact error: \(responseError(error))")
let a = getErrorAlert(error, "Error creating member contact")
await MainActor.run {
progressIndicator = false
alert = .error(title: a.title, error: a.message)
}
}
}
} label: {
Label("Send direct message", systemImage: "message")
}
}
private func groupMemberInfoHeader(_ mem: GroupMember) -> some View {
VStack {
ProfileImage(imageStr: mem.image, color: Color(uiColor: .tertiarySystemFill))

View File

@ -49,11 +49,10 @@ struct ChatListNavLink: View {
}
@ViewBuilder private func contactNavLink(_ contact: Contact) -> some View {
let v = NavLinkPlain(
NavLinkPlain(
tag: chat.chatInfo.id,
selection: $chatModel.chatId,
label: { ChatPreviewView(chat: chat) },
disabled: !contact.ready
label: { ChatPreviewView(chat: chat) }
)
.swipeActions(edge: .leading, allowsFullSwipe: true) {
markReadButton()
@ -76,14 +75,6 @@ struct ChatListNavLink: View {
.tint(.red)
}
.frame(height: rowHeights[dynamicTypeSize])
if contact.ready {
v
} else {
v.onTapGesture {
AlertManager.shared.showAlert(pendingContactAlert(chat, contact))
}
}
}
@ViewBuilder private func groupNavLink(_ groupInfo: GroupInfo) -> some View {

View File

@ -181,7 +181,11 @@ struct ChatPreviewView: View {
switch (chat.chatInfo) {
case let .direct(contact):
if !contact.ready {
chatPreviewInfoText("connecting…")
if contact.nextSendGrpInv {
chatPreviewInfoText("send direct message")
} else {
chatPreviewInfoText("connecting…")
}
}
case let .group(groupInfo):
switch (groupInfo.membership.memberStatus) {

View File

@ -1978,6 +1978,10 @@
<target>Chyba při vytváření odkazu skupiny</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Chyba při vytváření profilu!</target>
@ -2107,6 +2111,10 @@
<target>Chyba odesílání e-mailu</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Chyba při odesílání zprávy</target>
@ -3337,6 +3345,10 @@
<target>Hlasové zprávy může odesílat pouze váš kontakt.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Otevřít nastavení</target>
@ -4071,6 +4083,10 @@
<target>Odeslat přímou zprávu</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Poslat mizící zprávu</target>
@ -5613,6 +5629,10 @@ Servery SimpleX nevidí váš profil.</target>
<target>připojeno</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>připojování</target>
@ -6072,6 +6092,10 @@ Servery SimpleX nevidí váš profil.</target>
<target>bezpečnostní kód změněn</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>začíná…</target>

View File

@ -1979,6 +1979,10 @@
<target>Fehler beim Erzeugen des Gruppen-Links</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Fehler beim Erstellen des Profils!</target>
@ -2109,6 +2113,10 @@
<target>Fehler beim Senden der eMail</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Fehler beim Senden der Nachricht</target>
@ -3340,6 +3348,10 @@
<target>Nur Ihr Kontakt kann Sprachnachrichten versenden.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Geräte-Einstellungen öffnen</target>
@ -4075,6 +4087,10 @@
<target>Direktnachricht senden</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Verschwindende Nachricht senden</target>
@ -5625,6 +5641,10 @@ SimpleX-Server können Ihr Profil nicht einsehen.</target>
<target>Verbunden</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>verbinde</target>
@ -6086,6 +6106,10 @@ SimpleX-Server können Ihr Profil nicht einsehen.</target>
<target>Sicherheitscode wurde geändert</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>Verbindung wird gestartet…</target>

View File

@ -1988,6 +1988,11 @@
<target>Error creating group link</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<target>Error creating member contact</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Error creating profile!</target>
@ -2118,6 +2123,11 @@
<target>Error sending email</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<target>Error sending member contact invitation</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Error sending message</target>
@ -3350,6 +3360,11 @@
<target>Only your contact can send voice messages.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<target>Open</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Open Settings</target>
@ -4085,6 +4100,11 @@
<target>Send direct message</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<target>Send direct message to connect</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Send disappearing message</target>
@ -5637,6 +5657,11 @@ SimpleX servers cannot see your profile.</target>
<target>connected</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<target>connected directly</target>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>connecting</target>
@ -6098,6 +6123,11 @@ SimpleX servers cannot see your profile.</target>
<target>security code changed</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<target>send direct message</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>starting…</target>

View File

@ -1978,6 +1978,10 @@
<target>Error al crear enlace de grupo</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>¡Error al crear perfil!</target>
@ -2107,6 +2111,10 @@
<target>Error al enviar email</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Error al enviar mensaje</target>
@ -3338,6 +3346,10 @@
<target>Sólo tu contacto puede enviar mensajes de voz.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Abrir Configuración</target>
@ -4073,6 +4085,10 @@
<target>Enviar mensaje directo</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Enviar mensaje temporal</target>
@ -5624,6 +5640,10 @@ Los servidores de SimpleX no pueden ver tu perfil.</target>
<target>conectado</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>conectando</target>
@ -6085,6 +6105,10 @@ Los servidores de SimpleX no pueden ver tu perfil.</target>
<target>código de seguridad cambiado</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>inicializando…</target>

View File

@ -1979,6 +1979,10 @@
<target>Virhe ryhmälinkin luomisessa</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Virhe profiilin luomisessa!</target>
@ -2109,6 +2113,10 @@
<target>Virhe sähköpostin lähettämisessä</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Virhe viestin lähettämisessä</target>
@ -3340,6 +3348,10 @@
<target>Vain kontaktisi voi lähettää ääniviestejä.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Avaa Asetukset</target>
@ -4075,6 +4087,10 @@
<target>Lähetä yksityisviesti</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Lähetä katoava viesti</target>
@ -5625,6 +5641,10 @@ SimpleX-palvelimet eivät näe profiiliasi.</target>
<target>yhdistetty</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>yhdistää</target>
@ -6086,6 +6106,10 @@ SimpleX-palvelimet eivät näe profiiliasi.</target>
<target>turvakoodi on muuttunut</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>alkaa…</target>

View File

@ -1979,6 +1979,10 @@
<target>Erreur lors de la création du lien du groupe</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Erreur lors de la création du profil !</target>
@ -2109,6 +2113,10 @@
<target>Erreur lors de l'envoi de l'e-mail</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Erreur lors de l'envoi du message</target>
@ -3340,6 +3348,10 @@
<target>Seul votre contact peut envoyer des messages vocaux.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Ouvrir les Paramètres</target>
@ -4075,6 +4087,10 @@
<target>Envoi de message direct</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Envoyer un message éphémère</target>
@ -5625,6 +5641,10 @@ Les serveurs SimpleX ne peuvent pas voir votre profil.</target>
<target>connecté</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>connexion</target>
@ -6086,6 +6106,10 @@ Les serveurs SimpleX ne peuvent pas voir votre profil.</target>
<target>code de sécurité modifié</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>lancement…</target>

View File

@ -1979,6 +1979,10 @@
<target>Errore nella creazione del link del gruppo</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Errore nella creazione del profilo!</target>
@ -2109,6 +2113,10 @@
<target>Errore nell'invio dell'email</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Errore nell'invio del messaggio</target>
@ -3340,6 +3348,10 @@
<target>Solo il tuo contatto può inviare messaggi vocali.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Apri le impostazioni</target>
@ -4075,6 +4087,10 @@
<target>Invia messaggio diretto</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Invia messaggio a tempo</target>
@ -5625,6 +5641,10 @@ I server di SimpleX non possono vedere il tuo profilo.</target>
<target>connesso/a</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>in connessione</target>
@ -6086,6 +6106,10 @@ I server di SimpleX non possono vedere il tuo profilo.</target>
<target>codice di sicurezza modificato</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>avvio…</target>

View File

@ -1978,6 +1978,10 @@
<target>グループリンク生成にエラー発生</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>プロフィール作成にエラー発生!</target>
@ -2107,6 +2111,10 @@
<target>メールの送信にエラー発生</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>メッセージ送信にエラー発生</target>
@ -3336,6 +3344,10 @@
<target>音声メッセージを送れるのはあなたの連絡相手だけです。</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>設定を開く</target>
@ -4069,6 +4081,10 @@
<target>ダイレクトメッセージを送信</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>消えるメッセージを送信</target>
@ -5611,6 +5627,10 @@ SimpleX サーバーはあなたのプロファイルを参照できません。
<target>接続中</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>接続待ち</target>
@ -6072,6 +6092,10 @@ SimpleX サーバーはあなたのプロファイルを参照できません。
<target>セキュリティコードが変更されました</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>接続中…</target>

View File

@ -1979,6 +1979,10 @@
<target>Fout bij maken van groep link</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Fout bij aanmaken van profiel!</target>
@ -2109,6 +2113,10 @@
<target>Fout bij het verzenden van e-mail</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Fout bij verzenden van bericht</target>
@ -3340,6 +3348,10 @@
<target>Alleen uw contact kan spraak berichten verzenden.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Open instellingen</target>
@ -4075,6 +4087,10 @@
<target>Direct bericht sturen</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Stuur een verdwijnend bericht</target>
@ -5625,6 +5641,10 @@ SimpleX servers kunnen uw profiel niet zien.</target>
<target>verbonden</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>Verbinden</target>
@ -6086,6 +6106,10 @@ SimpleX servers kunnen uw profiel niet zien.</target>
<target>beveiligingscode gewijzigd</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>beginnen…</target>

View File

@ -1979,6 +1979,10 @@
<target>Błąd tworzenia linku grupy</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Błąd tworzenia profilu!</target>
@ -2109,6 +2113,10 @@
<target>Błąd wysyłania e-mail</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Błąd wysyłania wiadomości</target>
@ -3340,6 +3348,10 @@
<target>Tylko Twój kontakt może wysyłać wiadomości głosowe.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Otwórz Ustawienia</target>
@ -4075,6 +4087,10 @@
<target>Wyślij wiadomość bezpośrednią</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Wyślij znikającą wiadomość</target>
@ -5625,6 +5641,10 @@ Serwery SimpleX nie mogą zobaczyć Twojego profilu.</target>
<target>połączony</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>łączenie</target>
@ -6086,6 +6106,10 @@ Serwery SimpleX nie mogą zobaczyć Twojego profilu.</target>
<target>kod bezpieczeństwa zmieniony</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>uruchamianie…</target>

View File

@ -1978,6 +1978,10 @@
<target>Ошибка при создании ссылки группы</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Ошибка создания профиля!</target>
@ -2107,6 +2111,10 @@
<target>Ошибка отправки email</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Ошибка при отправке сообщения</target>
@ -3338,6 +3346,10 @@
<target>Только Ваш контакт может отправлять голосовые сообщения.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Открыть Настройки</target>
@ -4073,6 +4085,10 @@
<target>Отправить сообщение</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Отправить исчезающее сообщение</target>
@ -5623,6 +5639,10 @@ SimpleX серверы не могут получить доступ к Ваше
<target>соединение установлено</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>соединяется</target>
@ -6084,6 +6104,10 @@ SimpleX серверы не могут получить доступ к Ваше
<target>код безопасности изменился</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>инициализация…</target>

View File

@ -1966,6 +1966,10 @@
<target>เกิดข้อผิดพลาดในการสร้างลิงก์กลุ่ม</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>เกิดข้อผิดพลาดในการสร้างโปรไฟล์!</target>
@ -2095,6 +2099,10 @@
<target>เกิดข้อผิดพลาดในการส่งอีเมล</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>เกิดข้อผิดพลาดในการส่งข้อความ</target>
@ -3322,6 +3330,10 @@
<target>ผู้ติดต่อของคุณเท่านั้นที่สามารถส่งข้อความเสียงได้</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>เปิดการตั้งค่า</target>
@ -4054,6 +4066,10 @@
<target>ส่งข้อความโดยตรง</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>ส่งข้อความแบบที่หายไป</target>
@ -5595,6 +5611,10 @@ SimpleX servers cannot see your profile.</source>
<target>เชื่อมต่อสำเร็จ</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>กำลังเชื่อมต่อ</target>
@ -6054,6 +6074,10 @@ SimpleX servers cannot see your profile.</source>
<target>เปลี่ยนรหัสความปลอดภัยแล้ว</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>กำลังเริ่มต้น…</target>

View File

@ -1978,6 +1978,10 @@
<target>Помилка створення посилання на групу</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>Помилка створення профілю!</target>
@ -2107,6 +2111,10 @@
<target>Помилка надсилання електронного листа</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>Помилка надсилання повідомлення</target>
@ -3338,6 +3346,10 @@
<target>Тільки ваш контакт може надсилати голосові повідомлення.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>Відкрийте Налаштування</target>
@ -4073,6 +4085,10 @@
<target>Надішліть пряме повідомлення</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>Надіслати зникаюче повідомлення</target>
@ -5623,6 +5639,10 @@ SimpleX servers cannot see your profile.</source>
<target>з'єднаний</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>з'єднання</target>
@ -6084,6 +6104,10 @@ SimpleX servers cannot see your profile.</source>
<target>змінено код безпеки</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>починаючи…</target>

View File

@ -1979,6 +1979,10 @@
<target>创建群组链接错误</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating member contact" xml:space="preserve">
<source>Error creating member contact</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error creating profile!" xml:space="preserve">
<source>Error creating profile!</source>
<target>创建资料错误!</target>
@ -2109,6 +2113,10 @@
<target>发送电邮错误</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending member contact invitation" xml:space="preserve">
<source>Error sending member contact invitation</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Error sending message" xml:space="preserve">
<source>Error sending message</source>
<target>发送消息错误</target>
@ -3340,6 +3348,10 @@
<target>只有您的联系人可以发送语音消息。</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open" xml:space="preserve">
<source>Open</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Open Settings" xml:space="preserve">
<source>Open Settings</source>
<target>打开设置</target>
@ -4075,6 +4087,10 @@
<target>发送私信</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send direct message to connect" xml:space="preserve">
<source>Send direct message to connect</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="Send disappearing message" xml:space="preserve">
<source>Send disappearing message</source>
<target>发送限时消息中</target>
@ -5625,6 +5641,10 @@ SimpleX 服务器无法看到您的资料。</target>
<target>已连接</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="connected directly" xml:space="preserve">
<source>connected directly</source>
<note>rcv group event chat item</note>
</trans-unit>
<trans-unit id="connecting" xml:space="preserve">
<source>connecting</source>
<target>连接中</target>
@ -6086,6 +6106,10 @@ SimpleX 服务器无法看到您的资料。</target>
<target>安全密码已更改</target>
<note>chat item text</note>
</trans-unit>
<trans-unit id="send direct message" xml:space="preserve">
<source>send direct message</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="starting…" xml:space="preserve">
<source>starting…</source>
<target>启动中……</target>

View File

@ -153,6 +153,8 @@
5CFE0921282EEAF60002594B /* ZoomableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CFE0920282EEAF60002594B /* ZoomableScrollView.swift */; };
5CFE0922282EEAF60002594B /* ZoomableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CFE0920282EEAF60002594B /* ZoomableScrollView.swift */; };
6407BA83295DA85D0082BA18 /* CIInvalidJSONView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6407BA82295DA85D0082BA18 /* CIInvalidJSONView.swift */; };
6419EC562AB8BC8B004A607A /* ContextInvitingContactMemberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6419EC552AB8BC8B004A607A /* ContextInvitingContactMemberView.swift */; };
6419EC582AB97507004A607A /* CIMemberCreatedContactView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6419EC572AB97507004A607A /* CIMemberCreatedContactView.swift */; };
6432857C2925443C00FBE5C8 /* GroupPreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6432857B2925443C00FBE5C8 /* GroupPreferencesView.swift */; };
6440CA00288857A10062C672 /* CIEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6440C9FF288857A10062C672 /* CIEventView.swift */; };
6440CA03288AECA70062C672 /* AddGroupMembersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6440CA02288AECA70062C672 /* AddGroupMembersView.swift */; };
@ -429,6 +431,8 @@
5CFA59CF286477B400863A68 /* ChatArchiveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatArchiveView.swift; sourceTree = "<group>"; };
5CFE0920282EEAF60002594B /* ZoomableScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ZoomableScrollView.swift; path = Shared/Views/ZoomableScrollView.swift; sourceTree = SOURCE_ROOT; };
6407BA82295DA85D0082BA18 /* CIInvalidJSONView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CIInvalidJSONView.swift; sourceTree = "<group>"; };
6419EC552AB8BC8B004A607A /* ContextInvitingContactMemberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContextInvitingContactMemberView.swift; sourceTree = "<group>"; };
6419EC572AB97507004A607A /* CIMemberCreatedContactView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CIMemberCreatedContactView.swift; sourceTree = "<group>"; };
6432857B2925443C00FBE5C8 /* GroupPreferencesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupPreferencesView.swift; sourceTree = "<group>"; };
6440C9FF288857A10062C672 /* CIEventView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CIEventView.swift; sourceTree = "<group>"; };
6440CA02288AECA70062C672 /* AddGroupMembersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddGroupMembersView.swift; sourceTree = "<group>"; };
@ -822,6 +826,7 @@
6407BA82295DA85D0082BA18 /* CIInvalidJSONView.swift */,
18415FD2E36F13F596A45BB4 /* CIVideoView.swift */,
5CC868F229EB540C0017BBFD /* CIRcvDecryptionError.swift */,
6419EC572AB97507004A607A /* CIMemberCreatedContactView.swift */,
);
path = ChatItem;
sourceTree = "<group>";
@ -837,6 +842,7 @@
3CDBCF4127FAE51000354CDD /* ComposeLinkView.swift */,
644EFFDD292BCD9D00525D5B /* ComposeVoiceView.swift */,
D72A9087294BD7A70047C86D /* NativeTextEditor.swift */,
6419EC552AB8BC8B004A607A /* ContextInvitingContactMemberView.swift */,
);
path = ComposeMessage;
sourceTree = "<group>";
@ -1094,6 +1100,7 @@
5C93293129239BED0090FFF9 /* ProtocolServerView.swift in Sources */,
5C9CC7AD28C55D7800BEF955 /* DatabaseEncryptionView.swift in Sources */,
5CBD285A295711D700EC2CF4 /* ImageUtils.swift in Sources */,
6419EC562AB8BC8B004A607A /* ContextInvitingContactMemberView.swift in Sources */,
5CE4407927ADB701007B033A /* EmojiItemView.swift in Sources */,
5C3F1D562842B68D00EC8A82 /* IntegrityErrorItemView.swift in Sources */,
5C029EAA283942EA004A9677 /* CallController.swift in Sources */,
@ -1155,6 +1162,7 @@
5C2E260F27A30FDC00F70299 /* ChatView.swift in Sources */,
5C2E260B27A30CFA00F70299 /* ChatListView.swift in Sources */,
6442E0BA287F169300CEC0F9 /* AddGroupView.swift in Sources */,
6419EC582AB97507004A607A /* CIMemberCreatedContactView.swift in Sources */,
64D0C2C229FA57AB00B38D5F /* UserAddressLearnMore.swift in Sources */,
64466DCC29FFE3E800E3D48D /* MailView.swift in Sources */,
5C971E2127AEBF8300C8A3CE /* ChatInfoImage.swift in Sources */,

View File

@ -61,6 +61,8 @@ public enum ChatCommand {
case apiGroupLinkMemberRole(groupId: Int64, memberRole: GroupMemberRole)
case apiDeleteGroupLink(groupId: Int64)
case apiGetGroupLink(groupId: Int64)
case apiCreateMemberContact(groupId: Int64, groupMemberId: Int64)
case apiSendMemberContactInvitation(contactId: Int64, msg: MsgContent)
case apiGetUserProtoServers(userId: Int64, serverProtocol: ServerProtocol)
case apiSetUserProtoServers(userId: Int64, serverProtocol: ServerProtocol, servers: [ServerCfg])
case apiTestProtoServer(userId: Int64, server: String)
@ -181,6 +183,8 @@ public enum ChatCommand {
case let .apiGroupLinkMemberRole(groupId, memberRole): return "/_set link role #\(groupId) \(memberRole)"
case let .apiDeleteGroupLink(groupId): return "/_delete link #\(groupId)"
case let .apiGetGroupLink(groupId): return "/_get link #\(groupId)"
case let .apiCreateMemberContact(groupId, groupMemberId): return "/_create member contact #\(groupId) \(groupMemberId)"
case let .apiSendMemberContactInvitation(contactId, mc): return "/_invite member contact @\(contactId) \(mc.cmdString)"
case let .apiGetUserProtoServers(userId, serverProtocol): return "/_servers \(userId) \(serverProtocol)"
case let .apiSetUserProtoServers(userId, serverProtocol, servers): return "/_servers \(userId) \(serverProtocol) \(protoServersStr(servers))"
case let .apiTestProtoServer(userId, server): return "/_server test \(userId) \(server)"
@ -304,6 +308,8 @@ public enum ChatCommand {
case .apiGroupLinkMemberRole: return "apiGroupLinkMemberRole"
case .apiDeleteGroupLink: return "apiDeleteGroupLink"
case .apiGetGroupLink: return "apiGetGroupLink"
case .apiCreateMemberContact: return "apiCreateMemberContact"
case .apiSendMemberContactInvitation: return "apiSendMemberContactInvitation"
case .apiGetUserProtoServers: return "apiGetUserProtoServers"
case .apiSetUserProtoServers: return "apiSetUserProtoServers"
case .apiTestProtoServer: return "apiTestProtoServer"
@ -514,6 +520,9 @@ public enum ChatResponse: Decodable, Error {
case groupLinkCreated(user: UserRef, groupInfo: GroupInfo, connReqContact: String, memberRole: GroupMemberRole)
case groupLink(user: UserRef, groupInfo: GroupInfo, connReqContact: String, memberRole: GroupMemberRole)
case groupLinkDeleted(user: UserRef, groupInfo: GroupInfo)
case newMemberContact(user: UserRef, contact: Contact, groupInfo: GroupInfo, member: GroupMember)
case newMemberContactSentInv(user: UserRef, contact: Contact, groupInfo: GroupInfo, member: GroupMember)
case newMemberContactReceivedInv(user: UserRef, contact: Contact, groupInfo: GroupInfo, member: GroupMember)
// receiving file events
case rcvFileAccepted(user: UserRef, chatItem: AChatItem)
case rcvFileAcceptedSndCancelled(user: UserRef, rcvFileTransfer: RcvFileTransfer)
@ -647,6 +656,9 @@ public enum ChatResponse: Decodable, Error {
case .groupLinkCreated: return "groupLinkCreated"
case .groupLink: return "groupLink"
case .groupLinkDeleted: return "groupLinkDeleted"
case .newMemberContact: return "newMemberContact"
case .newMemberContactSentInv: return "newMemberContactSentInv"
case .newMemberContactReceivedInv: return "newMemberContactReceivedInv"
case .rcvFileAccepted: return "rcvFileAccepted"
case .rcvFileAcceptedSndCancelled: return "rcvFileAcceptedSndCancelled"
case .rcvFileStart: return "rcvFileStart"
@ -780,6 +792,9 @@ public enum ChatResponse: Decodable, Error {
case let .groupLinkCreated(u, groupInfo, connReqContact, memberRole): return withUser(u, "groupInfo: \(groupInfo)\nconnReqContact: \(connReqContact)\nmemberRole: \(memberRole)")
case let .groupLink(u, groupInfo, connReqContact, memberRole): return withUser(u, "groupInfo: \(groupInfo)\nconnReqContact: \(connReqContact)\nmemberRole: \(memberRole)")
case let .groupLinkDeleted(u, groupInfo): return withUser(u, String(describing: groupInfo))
case let .newMemberContact(u, contact, groupInfo, member): return withUser(u, "contact: \(contact)\ngroupInfo: \(groupInfo)\nmember: \(member)")
case let .newMemberContactSentInv(u, contact, groupInfo, member): return withUser(u, "contact: \(contact)\ngroupInfo: \(groupInfo)\nmember: \(member)")
case let .newMemberContactReceivedInv(u, contact, groupInfo, member): return withUser(u, "contact: \(contact)\ngroupInfo: \(groupInfo)\nmember: \(member)")
case let .rcvFileAccepted(u, chatItem): return withUser(u, String(describing: chatItem))
case .rcvFileAcceptedSndCancelled: return noDetails
case let .rcvFileStart(u, chatItem): return withUser(u, String(describing: chatItem))
@ -1454,6 +1469,7 @@ public enum ChatErrorType: Decodable {
case agentCommandError(message: String)
case invalidFileDescription(message: String)
case connectionIncognitoChangeProhibited
case peerChatVRangeIncompatible
case internalError(message: String)
case exception(message: String)
}
@ -1479,6 +1495,7 @@ public enum StoreError: Decodable {
case groupMemberNameNotFound(groupId: Int64, groupMemberName: ContactName)
case groupMemberNotFound(groupMemberId: Int64)
case groupMemberNotFoundByMemberId(memberId: String)
case memberContactGroupMemberNotFound(contactId: Int64)
case groupWithoutUser
case duplicateGroupMember
case groupAlreadyJoined

View File

@ -1378,11 +1378,17 @@ public struct Contact: Identifiable, Decodable, NamedChat {
public var mergedPreferences: ContactUserPreferences
var createdAt: Date
var updatedAt: Date
var contactGroupMemberId: Int64?
var contactGrpInvSent: Bool
public var id: ChatId { get { "@\(contactId)" } }
public var apiId: Int64 { get { contactId } }
public var ready: Bool { get { activeConn.connStatus == .ready } }
public var sendMsgEnabled: Bool { get { !(activeConn.connectionStats?.ratchetSyncSendProhibited ?? false) } }
public var sendMsgEnabled: Bool { get {
(ready && !(activeConn.connectionStats?.ratchetSyncSendProhibited ?? false))
|| nextSendGrpInv
} }
public var nextSendGrpInv: Bool { get { contactGroupMemberId != nil && !contactGrpInvSent } }
public var displayName: String { localAlias == "" ? profile.displayName : localAlias }
public var fullName: String { get { profile.fullName } }
public var image: String? { get { profile.image } }
@ -1428,7 +1434,8 @@ public struct Contact: Identifiable, Decodable, NamedChat {
userPreferences: Preferences.sampleData,
mergedPreferences: ContactUserPreferences.sampleData,
createdAt: .now,
updatedAt: .now
updatedAt: .now,
contactGrpInvSent: false
)
}
@ -1449,6 +1456,7 @@ public struct ContactSubStatus: Decodable {
public struct Connection: Decodable {
public var connId: Int64
public var agentConnId: String
public var peerChatVRange: VersionRange
var connStatus: ConnStatus
public var connLevel: Int
public var viaGroupLink: Bool
@ -1458,7 +1466,7 @@ public struct Connection: Decodable {
public var connectionStats: ConnectionStats? = nil
private enum CodingKeys: String, CodingKey {
case connId, agentConnId, connStatus, connLevel, viaGroupLink, customUserProfileId, connectionCode
case connId, agentConnId, peerChatVRange, connStatus, connLevel, viaGroupLink, customUserProfileId, connectionCode
}
public var id: ChatId { get { ":\(connId)" } }
@ -1466,12 +1474,27 @@ public struct Connection: Decodable {
static let sampleData = Connection(
connId: 1,
agentConnId: "abc",
peerChatVRange: VersionRange(minVersion: 1, maxVersion: 1),
connStatus: .ready,
connLevel: 0,
viaGroupLink: false
)
}
public struct VersionRange: Decodable {
public init(minVersion: Int, maxVersion: Int) {
self.minVersion = minVersion
self.maxVersion = maxVersion
}
public var minVersion: Int
public var maxVersion: Int
public func isCompatibleRange(_ vRange: VersionRange) -> Bool {
self.minVersion <= vRange.maxVersion && vRange.minVersion <= self.maxVersion
}
}
public struct SecurityCode: Decodable, Equatable {
public init(securityCode: String, verifiedAt: Date) {
self.securityCode = securityCode
@ -1503,6 +1526,7 @@ public struct UserContact: Decodable {
public struct UserContactRequest: Decodable, NamedChat {
var contactRequestId: Int64
public var userContactLinkId: Int64
public var cReqChatVRange: VersionRange
var localDisplayName: ContactName
var profile: Profile
var createdAt: Date
@ -1520,6 +1544,7 @@ public struct UserContactRequest: Decodable, NamedChat {
public static let sampleData = UserContactRequest(
contactRequestId: 1,
userContactLinkId: 1,
cReqChatVRange: VersionRange(minVersion: 1, maxVersion: 1),
localDisplayName: "alice",
profile: Profile.sampleData,
createdAt: .now,
@ -2078,6 +2103,7 @@ public struct ChatItem: Identifiable, Decodable {
case .memberLeft: return false
case .memberDeleted: return false
case .invitedViaGroupLink: return false
case .memberCreatedContact: return false
}
case .sndGroupEvent: return showNtfDir
case .rcvConnEvent: return false
@ -3181,6 +3207,7 @@ public enum RcvGroupEvent: Decodable {
case groupDeleted
case groupUpdated(groupProfile: GroupProfile)
case invitedViaGroupLink
case memberCreatedContact
var text: String {
switch self {
@ -3198,6 +3225,7 @@ public enum RcvGroupEvent: Decodable {
case .groupDeleted: return NSLocalizedString("deleted group", comment: "rcv group event chat item")
case .groupUpdated: return NSLocalizedString("updated group profile", comment: "rcv group event chat item")
case .invitedViaGroupLink: return NSLocalizedString("invited via your group link", comment: "rcv group event chat item")
case .memberCreatedContact: return NSLocalizedString("connected directly", comment: "rcv group event chat item")
}
}
}