ios: allow sending messages immediately on joinConnection, acceptContact (#4478)

This commit is contained in:
spaced4ndy
2024-07-19 11:31:43 +04:00
committed by GitHub
parent bfab76ed90
commit fa73e63a79
42 changed files with 142 additions and 120 deletions
+17 -1
View File
@@ -1143,7 +1143,10 @@ func networkErrorAlert(_ r: ChatResponse) -> Alert? {
func acceptContactRequest(incognito: Bool, contactRequest: UserContactRequest) async {
if let contact = await apiAcceptContactRequest(incognito: incognito, contactReqId: contactRequest.apiId) {
let chat = Chat(chatInfo: ChatInfo.direct(contact: contact), chatItems: [])
DispatchQueue.main.async { ChatModel.shared.replaceChat(contactRequest.id, chat) }
DispatchQueue.main.async {
ChatModel.shared.replaceChat(contactRequest.id, chat)
ChatModel.shared.setContactNetworkStatus(contact, .connected)
}
}
}
@@ -1649,6 +1652,19 @@ func processReceivedMsg(_ res: ChatResponse) async {
}
}
}
case let .contactSndReady(user, contact):
if active(user) && contact.directOrUsed {
await MainActor.run {
m.updateContact(contact)
if let conn = contact.activeConn {
m.dismissConnReqView(conn.id)
m.removeChat(conn.id)
}
}
}
await MainActor.run {
m.setContactNetworkStatus(contact, .connected)
}
case let .receivedContactRequest(user, contactRequest):
if active(user) {
let cInfo = ChatInfo.contactRequest(contactRequest: contactRequest)
+13 -11
View File
@@ -155,23 +155,25 @@ struct ChatInfoView: View {
}
Section {
if let code = connectionCode { verifyCodeButton(code) }
contactPreferencesButton()
sendReceiptsOption()
if let connStats = connectionStats,
connStats.ratchetSyncAllowed {
synchronizeConnectionButton()
Group {
if let code = connectionCode { verifyCodeButton(code) }
contactPreferencesButton()
sendReceiptsOption()
if let connStats = connectionStats,
connStats.ratchetSyncAllowed {
synchronizeConnectionButton()
}
// } else if developerTools {
// synchronizeConnectionButtonForce()
// }
}
.disabled(!contact.ready || !contact.active)
NavigationLink {
ChatWallpaperEditorSheet(chat: chat)
} label: {
Label("Chat theme", systemImage: "photo")
}
// } else if developerTools {
// synchronizeConnectionButtonForce()
// }
}
.disabled(!contact.ready || !contact.active)
if let conn = contact.activeConn {
Section {
@@ -271,7 +273,7 @@ struct ChatInfoView: View {
}
}
.actionSheet(isPresented: $showDeleteContactActionSheet) {
if contact.ready && contact.active {
if contact.sndReady && contact.active {
return ActionSheet(
title: Text("Delete contact?\nThis cannot be undone!"),
buttons: [
+1 -1
View File
@@ -378,7 +378,7 @@ struct ChatView: View {
@ViewBuilder private func connectingText() -> some View {
if case let .direct(contact) = chat.chatInfo,
!contact.ready,
!contact.sndReady,
contact.active,
!contact.nextSendGrpInv {
Text("connecting…")
@@ -100,7 +100,7 @@ struct ChatListNavLink: View {
clearChatButton()
}
Button {
if contact.ready || !contact.active {
if contact.sndReady || !contact.active {
showDeleteContactActionSheet = true
} else {
AlertManager.shared.showAlert(deletePendingContactAlert(chat, contact))
@@ -114,7 +114,7 @@ struct ChatListNavLink: View {
}
}
.actionSheet(isPresented: $showDeleteContactActionSheet) {
if contact.ready && contact.active {
if contact.sndReady && contact.active {
return ActionSheet(
title: Text("Delete contact?\nThis cannot be undone!"),
buttons: [
@@ -207,7 +207,7 @@ struct ChatPreviewView: View {
if contact.activeConn == nil && contact.profile.contactLink != nil {
chatPreviewInfoText("Tap to Connect")
.foregroundColor(theme.colors.primary)
} else if !contact.ready && contact.activeConn != nil {
} else if !contact.sndReady && contact.activeConn != nil {
if contact.nextSendGrpInv {
chatPreviewInfoText("send direct message")
} else if contact.active {
@@ -7064,8 +7064,8 @@ Repeat join request?</source>
<target>Можете да го направите видим за вашите контакти в SimpleX чрез Настройки.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Вече можете да изпращате съобщения до %@</target>
<note>notification body</note>
</trans-unit>
@@ -7472,7 +7472,7 @@ SimpleX сървърите не могат да видят вашия профи
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>блокиран от админ</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -6797,8 +6797,8 @@ Repeat join request?</source>
<source>You can make it visible to your SimpleX contacts via Settings.</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Nyní můžete posílat zprávy %@</target>
<note>notification body</note>
</trans-unit>
@@ -7191,7 +7191,7 @@ Servery SimpleX nevidí váš profil.</target>
</trans-unit>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7226,8 +7226,8 @@ Verbindungsanfrage wiederholen?</target>
<target>Sie können sie über Einstellungen für Ihre SimpleX-Kontakte sichtbar machen.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Sie können nun Nachrichten an %@ versenden</target>
<note>notification body</note>
</trans-unit>
@@ -7635,7 +7635,7 @@ SimpleX-Server können Ihr Profil nicht einsehen.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>wurde vom Administrator blockiert</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7236,9 +7236,9 @@ Repeat join request?</target>
<target>You can make it visible to your SimpleX contacts via Settings.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<target>You can now send messages to %@</target>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>You can now chat with %@</target>
<note>notification body</note>
</trans-unit>
<trans-unit id="You can set lock screen notification preview via settings." xml:space="preserve">
@@ -7645,7 +7645,7 @@ SimpleX servers cannot see your profile.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>blocked by admin</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Repeat join request?</source>
<target>Puedes hacerlo visible para tus contactos de SimpleX en Configuración.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Ya puedes enviar mensajes a %@</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ Los servidores SimpleX no pueden ver tu perfil.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>bloqueado por administrador</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -6782,8 +6782,8 @@ Repeat join request?</source>
<source>You can make it visible to your SimpleX contacts via Settings.</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Voit nyt lähettää viestejä %@:lle</target>
<note>notification body</note>
</trans-unit>
@@ -7176,7 +7176,7 @@ SimpleX-palvelimet eivät näe profiiliasi.</target>
</trans-unit>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Répéter la demande d'adhésion ?</target>
<target>Vous pouvez le rendre visible à vos contacts SimpleX via Paramètres.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Vous pouvez maintenant envoyer des messages à %@</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ Les serveurs SimpleX ne peuvent pas voir votre profil.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>bloqué par l'administrateur</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7226,8 +7226,8 @@ Csatlakozási kérés megismétlése?</target>
<target>Láthatóvá teheti SimpleX ismerősök számára a Beállításokban.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Mostantól küldhet üzeneteket %@ számára</target>
<note>notification body</note>
</trans-unit>
@@ -7635,7 +7635,7 @@ A SimpleX kiszolgálók nem látjhatják profilját.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>letiltva az admin által</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7226,8 +7226,8 @@ Ripetere la richiesta di ingresso?</target>
<target>Puoi renderlo visibile ai tuoi contatti SimpleX nelle impostazioni.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Ora puoi inviare messaggi a %@</target>
<note>notification body</note>
</trans-unit>
@@ -7635,7 +7635,7 @@ I server di SimpleX non possono vedere il tuo profilo.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>bloccato dall'amministratore</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -6800,8 +6800,8 @@ Repeat join request?</source>
<source>You can make it visible to your SimpleX contacts via Settings.</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>%@ にメッセージを送信できるようになりました</target>
<note>notification body</note>
</trans-unit>
@@ -7194,7 +7194,7 @@ SimpleX サーバーはあなたのプロファイルを参照できません。
</trans-unit>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Deelnameverzoek herhalen?</target>
<target>Je kunt het via Instellingen zichtbaar maken voor je SimpleX contacten.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Je kunt nu berichten sturen naar %@</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ SimpleX servers kunnen uw profiel niet zien.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>geblokkeerd door beheerder</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Powtórzyć prośbę dołączenia?</target>
<target>Możesz ustawić go jako widoczny dla swoich kontaktów SimpleX w Ustawieniach.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Możesz teraz wysyłać wiadomości do %@</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ Serwery SimpleX nie mogą zobaczyć Twojego profilu.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>zablokowany przez admina</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7101,9 +7101,9 @@ Repeat join request?</source>
<target>Вы можете сделать его видимым для ваших контактов в SimpleX через Настройки.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<target>Вы теперь можете отправлять сообщения %@</target>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Вы теперь можете общаться с %@</target>
<note>notification body</note>
</trans-unit>
<trans-unit id="You can set lock screen notification preview via settings." xml:space="preserve">
@@ -7509,7 +7509,7 @@ SimpleX серверы не могут получить доступ к Ваше
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>заблокировано администратором</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -6754,8 +6754,8 @@ Repeat join request?</source>
<source>You can make it visible to your SimpleX contacts via Settings.</source>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>ตอนนี้คุณสามารถส่งข้อความถึง %@</target>
<note>notification body</note>
</trans-unit>
@@ -7146,7 +7146,7 @@ SimpleX servers cannot see your profile.</source>
</trans-unit>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Katılma isteği tekrarlansın mı?</target>
<target>Ayarlardan SimpleX kişilerinize görünür yapabilirsiniz.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Artık %@ adresine mesaj gönderebilirsin</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ SimpleX sunucuları profilinizi göremez.</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>yönetici tarafından engellendi</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7103,8 +7103,8 @@ Repeat join request?</source>
<target>Ви можете зробити його видимим для ваших контактів у SimpleX за допомогою налаштувань.</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>Тепер ви можете надсилати повідомлення на адресу %@</target>
<note>notification body</note>
</trans-unit>
@@ -7511,7 +7511,7 @@ SimpleX servers cannot see your profile.</source>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>заблоковано адміністратором</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
@@ -7004,8 +7004,8 @@ Repeat join request?</source>
<target>你可以通过设置让它对你的 SimpleX 联系人可见。</target>
<note>No comment provided by engineer.</note>
</trans-unit>
<trans-unit id="You can now send messages to %@" xml:space="preserve">
<source>You can now send messages to %@</source>
<trans-unit id="You can now chat with %@" xml:space="preserve">
<source>You can now chat with %@</source>
<target>您现在可以给 %@ 发送消息</target>
<note>notification body</note>
</trans-unit>
@@ -7407,7 +7407,7 @@ SimpleX 服务器无法看到您的资料。</target>
<trans-unit id="blocked by admin" xml:space="preserve">
<source>blocked by admin</source>
<target>由管理员封禁</target>
<note>blocked chat item</note>
<note>marked deleted chat item preview text</note>
</trans-unit>
<trans-unit id="bold" xml:space="preserve">
<source>bold</source>
+20 -20
View File
@@ -170,6 +170,11 @@
649BCDA22805D6EF00C3A862 /* CIImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649BCDA12805D6EF00C3A862 /* CIImageView.swift */; };
64AA1C6927EE10C800AC7277 /* ContextItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64AA1C6827EE10C800AC7277 /* ContextItemView.swift */; };
64AA1C6C27F3537400AC7277 /* DeletedItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64AA1C6B27F3537400AC7277 /* DeletedItemView.swift */; };
64BAC45E2C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64BAC4592C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a */; };
64BAC45F2C495205008D3995 /* libffi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64BAC45A2C495205008D3995 /* libffi.a */; };
64BAC4602C495205008D3995 /* libgmpxx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64BAC45B2C495205008D3995 /* libgmpxx.a */; };
64BAC4612C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64BAC45C2C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a */; };
64BAC4622C495205008D3995 /* libgmp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64BAC45D2C495205008D3995 /* libgmp.a */; };
64C06EB52A0A4A7C00792D4D /* ChatItemInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64C06EB42A0A4A7C00792D4D /* ChatItemInfoView.swift */; };
64C3B0212A0D359700E19930 /* CustomTimePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64C3B0202A0D359700E19930 /* CustomTimePicker.swift */; };
64D0C2C029F9688300B38D5F /* UserAddressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64D0C2BF29F9688300B38D5F /* UserAddressView.swift */; };
@@ -205,11 +210,6 @@
D77B92DC2952372200A5A1CC /* SwiftyGif in Frameworks */ = {isa = PBXBuildFile; productRef = D77B92DB2952372200A5A1CC /* SwiftyGif */; };
D7F0E33929964E7E0068AF69 /* LZString in Frameworks */ = {isa = PBXBuildFile; productRef = D7F0E33829964E7E0068AF69 /* LZString */; };
E50581062C3DDD9D009C3F71 /* Yams in Frameworks */ = {isa = PBXBuildFile; productRef = E50581052C3DDD9D009C3F71 /* Yams */; };
E505810C2C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E50581072C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a */; };
E505810D2C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E50581082C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a */; };
E505810E2C4656A4009C3F71 /* libgmpxx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E50581092C4656A4009C3F71 /* libgmpxx.a */; };
E505810F2C4656A4009C3F71 /* libffi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E505810A2C4656A4009C3F71 /* libffi.a */; };
E50581102C4656A4009C3F71 /* libgmp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E505810B2C4656A4009C3F71 /* libgmp.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -480,6 +480,11 @@
649BCDA12805D6EF00C3A862 /* CIImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CIImageView.swift; sourceTree = "<group>"; };
64AA1C6827EE10C800AC7277 /* ContextItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContextItemView.swift; sourceTree = "<group>"; };
64AA1C6B27F3537400AC7277 /* DeletedItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletedItemView.swift; sourceTree = "<group>"; };
64BAC4592C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a"; sourceTree = "<group>"; };
64BAC45A2C495205008D3995 /* libffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libffi.a; sourceTree = "<group>"; };
64BAC45B2C495205008D3995 /* libgmpxx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgmpxx.a; sourceTree = "<group>"; };
64BAC45C2C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a"; sourceTree = "<group>"; };
64BAC45D2C495205008D3995 /* libgmp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgmp.a; sourceTree = "<group>"; };
64C06EB42A0A4A7C00792D4D /* ChatItemInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatItemInfoView.swift; sourceTree = "<group>"; };
64C3B0202A0D359700E19930 /* CustomTimePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTimePicker.swift; sourceTree = "<group>"; };
64D0C2BF29F9688300B38D5F /* UserAddressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAddressView.swift; sourceTree = "<group>"; };
@@ -510,11 +515,6 @@
D741547729AF89AF0022400A /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.1.sdk/System/Library/Frameworks/StoreKit.framework; sourceTree = DEVELOPER_DIR; };
D741547929AF90B00022400A /* PushKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PushKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.1.sdk/System/Library/Frameworks/PushKit.framework; sourceTree = DEVELOPER_DIR; };
D7AA2C3429A936B400737B40 /* MediaEncryption.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = MediaEncryption.playground; path = Shared/MediaEncryption.playground; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
E50581072C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a"; sourceTree = "<group>"; };
E50581082C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a"; sourceTree = "<group>"; };
E50581092C4656A4009C3F71 /* libgmpxx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgmpxx.a; sourceTree = "<group>"; };
E505810A2C4656A4009C3F71 /* libffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libffi.a; sourceTree = "<group>"; };
E505810B2C4656A4009C3F71 /* libgmp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgmp.a; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -554,14 +554,14 @@
buildActionMask = 2147483647;
files = (
5CE2BA93284534B000EC33A6 /* libiconv.tbd in Frameworks */,
E50581102C4656A4009C3F71 /* libgmp.a in Frameworks */,
64BAC4622C495205008D3995 /* libgmp.a in Frameworks */,
64BAC45F2C495205008D3995 /* libffi.a in Frameworks */,
5CE2BA94284534BB00EC33A6 /* libz.tbd in Frameworks */,
E505810C2C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a in Frameworks */,
E505810F2C4656A4009C3F71 /* libffi.a in Frameworks */,
E50581062C3DDD9D009C3F71 /* Yams in Frameworks */,
E505810D2C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a in Frameworks */,
CE38A29C2C3FCD72005ED185 /* SwiftyGif in Frameworks */,
E505810E2C4656A4009C3F71 /* libgmpxx.a in Frameworks */,
64BAC4612C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a in Frameworks */,
64BAC45E2C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a in Frameworks */,
64BAC4602C495205008D3995 /* libgmpxx.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -628,11 +628,11 @@
5C764E5C279C70B7000C6508 /* Libraries */ = {
isa = PBXGroup;
children = (
E505810A2C4656A4009C3F71 /* libffi.a */,
E505810B2C4656A4009C3F71 /* libgmp.a */,
E50581092C4656A4009C3F71 /* libgmpxx.a */,
E50581072C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4-ghc9.6.3.a */,
E50581082C4656A4009C3F71 /* libHSsimplex-chat-6.0.0.1-6hE2sENjTY0J94Us5F3bT4.a */,
64BAC45A2C495205008D3995 /* libffi.a */,
64BAC45D2C495205008D3995 /* libgmp.a */,
64BAC45B2C495205008D3995 /* libgmpxx.a */,
64BAC45C2C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU-ghc9.6.3.a */,
64BAC4592C495205008D3995 /* libHSsimplex-chat-6.0.0.1-J5MWx9pYOGnDBWRfMkQxFU.a */,
);
path = Libraries;
sourceTree = "<group>";
+3
View File
@@ -575,6 +575,7 @@ public enum ChatResponse: Decodable, Error {
case userContactLinkDeleted(user: User)
case contactConnected(user: UserRef, contact: Contact, userCustomProfile: Profile?)
case contactConnecting(user: UserRef, contact: Contact)
case contactSndReady(user: UserRef, contact: Contact)
case receivedContactRequest(user: UserRef, contactRequest: UserContactRequest)
case acceptingContactRequest(user: UserRef, contact: Contact)
case contactRequestRejected(user: UserRef)
@@ -742,6 +743,7 @@ public enum ChatResponse: Decodable, Error {
case .userContactLinkDeleted: return "userContactLinkDeleted"
case .contactConnected: return "contactConnected"
case .contactConnecting: return "contactConnecting"
case .contactSndReady: return "contactSndReady"
case .receivedContactRequest: return "receivedContactRequest"
case .acceptingContactRequest: return "acceptingContactRequest"
case .contactRequestRejected: return "contactRequestRejected"
@@ -907,6 +909,7 @@ public enum ChatResponse: Decodable, Error {
case .userContactLinkDeleted: return noDetails
case let .contactConnected(u, contact, _): return withUser(u, String(describing: contact))
case let .contactConnecting(u, contact): return withUser(u, String(describing: contact))
case let .contactSndReady(u, contact): return withUser(u, String(describing: contact))
case let .receivedContactRequest(u, contactRequest): return withUser(u, String(describing: contactRequest))
case let .acceptingContactRequest(u, contact): return withUser(u, String(describing: contact))
case .contactRequestRejected: return noDetails
+3 -2
View File
@@ -1512,10 +1512,11 @@ public struct Contact: Identifiable, Decodable, NamedChat, Hashable {
public var id: ChatId { get { "@\(contactId)" } }
public var apiId: Int64 { get { contactId } }
public var ready: Bool { get { activeConn?.connStatus == .ready } }
public var sndReady: Bool { get { ready || activeConn?.connStatus == .sndReady } }
public var active: Bool { get { contactStatus == .active } }
public var sendMsgEnabled: Bool { get {
(
ready
sndReady
&& active
&& !(activeConn?.connectionStats?.ratchetSyncSendProhibited ?? false)
&& !(activeConn?.connDisabled ?? true)
@@ -1824,7 +1825,7 @@ public enum ConnStatus: String, Decodable, Hashable {
case .joined: return false
case .requested: return true
case .accepted: return true
case .sndReady: return false
case .sndReady: return nil
case .ready: return nil
case .deleted: return nil
}
+1 -1
View File
@@ -47,7 +47,7 @@ public func createContactConnectedNtf(_ user: any UserLike, _ contact: Contact)
hideContent ? NSLocalizedString("A new contact", comment: "notification title") : contact.displayName
),
body: String.localizedStringWithFormat(
NSLocalizedString("You can now send messages to %@", comment: "notification body"),
NSLocalizedString("You can now chat with %@", comment: "notification body"),
hideContent ? NSLocalizedString("this contact", comment: "notification title") : contact.chatViewName
),
targetContentIdentifier: contact.id,
+2 -2
View File
@@ -641,7 +641,7 @@
/* rcv group event chat item */
"blocked %@" = "блокиран %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "блокиран от админ";
/* No comment provided by engineer. */
@@ -4294,7 +4294,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Можете да го направите видим за вашите контакти в SimpleX чрез Настройки.";
/* notification body */
"You can now send messages to %@" = "Вече можете да изпращате съобщения до %@";
"You can now chat with %@" = "Вече можете да изпращате съобщения до %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Можете да зададете визуализация на известията на заключен екран през настройките.";
+1 -1
View File
@@ -3436,7 +3436,7 @@
"You can hide or mute a user profile - swipe it to the right." = "Profil uživatele můžete skrýt nebo ztlumit - přejeďte prstem doprava.";
/* notification body */
"You can now send messages to %@" = "Nyní můžete posílat zprávy %@";
"You can now chat with %@" = "Nyní můžete posílat zprávy %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Náhled oznámení na zamykací obrazovce můžete změnit v nastavení.";
+2 -2
View File
@@ -686,7 +686,7 @@
/* rcv group event chat item */
"blocked %@" = "%@ wurde blockiert";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "wurde vom Administrator blockiert";
/* No comment provided by engineer. */
@@ -4801,7 +4801,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Sie können sie über Einstellungen für Ihre SimpleX-Kontakte sichtbar machen.";
/* notification body */
"You can now send messages to %@" = "Sie können nun Nachrichten an %@ versenden";
"You can now chat with %@" = "Sie können nun Nachrichten an %@ versenden";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Über die Geräte-Einstellungen können Sie die Benachrichtigungsvorschau im Sperrbildschirm erlauben.";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "ha bloqueado a %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "bloqueado por administrador";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Puedes hacerlo visible para tus contactos de SimpleX en Configuración.";
/* notification body */
"You can now send messages to %@" = "Ya puedes enviar mensajes a %@";
"You can now chat with %@" = "Ya puedes enviar mensajes a %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Puedes configurar las notificaciones de la pantalla de bloqueo desde Configuración.";
+1 -1
View File
@@ -3394,7 +3394,7 @@
"You can hide or mute a user profile - swipe it to the right." = "Voit piilottaa tai mykistää käyttäjäprofiilin pyyhkäisemällä sitä oikealle.";
/* notification body */
"You can now send messages to %@" = "Voit nyt lähettää viestejä %@:lle";
"You can now chat with %@" = "Voit nyt lähettää viestejä %@:lle";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Voit määrittää lukitusnäytön ilmoituksen esikatselun asetuksista.";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "%@ bloqué";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "bloqué par l'administrateur";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Vous pouvez le rendre visible à vos contacts SimpleX via Paramètres.";
/* notification body */
"You can now send messages to %@" = "Vous pouvez maintenant envoyer des messages à %@";
"You can now chat with %@" = "Vous pouvez maintenant envoyer des messages à %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Vous pouvez configurer l'aperçu des notifications sur l'écran de verrouillage via les paramètres.";
+2 -2
View File
@@ -686,7 +686,7 @@
/* rcv group event chat item */
"blocked %@" = "letiltotta őt: %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "letiltva az admin által";
/* No comment provided by engineer. */
@@ -4801,7 +4801,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Láthatóvá teheti SimpleX ismerősök számára a Beállításokban.";
/* notification body */
"You can now send messages to %@" = "Mostantól küldhet üzeneteket %@ számára";
"You can now chat with %@" = "Mostantól küldhet üzeneteket %@ számára";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "A beállításokon keresztül beállíthatja a lezárási képernyő értesítési előnézetét.";
+2 -2
View File
@@ -686,7 +686,7 @@
/* rcv group event chat item */
"blocked %@" = "ha bloccato %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "bloccato dall'amministratore";
/* No comment provided by engineer. */
@@ -4801,7 +4801,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Puoi renderlo visibile ai tuoi contatti SimpleX nelle impostazioni.";
/* notification body */
"You can now send messages to %@" = "Ora puoi inviare messaggi a %@";
"You can now chat with %@" = "Ora puoi inviare messaggi a %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Puoi impostare l'anteprima della notifica nella schermata di blocco tramite le impostazioni.";
+1 -1
View File
@@ -3448,7 +3448,7 @@
"You can hide or mute a user profile - swipe it to the right." = "ユーザープロファイルを右にスワイプすると、非表示またはミュートにすることができます。";
/* notification body */
"You can now send messages to %@" = "%@ にメッセージを送信できるようになりました";
"You can now chat with %@" = "%@ にメッセージを送信できるようになりました";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "設定からロック画面の通知プレビューを設定できます。";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "geblokkeerd %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "geblokkeerd door beheerder";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Je kunt het via Instellingen zichtbaar maken voor je SimpleX contacten.";
/* notification body */
"You can now send messages to %@" = "Je kunt nu berichten sturen naar %@";
"You can now chat with %@" = "Je kunt nu berichten sturen naar %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "U kunt een voorbeeld van een melding op het vergrendeld scherm instellen via instellingen.";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "zablokowany %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "zablokowany przez admina";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Możesz ustawić go jako widoczny dla swoich kontaktów SimpleX w Ustawieniach.";
/* notification body */
"You can now send messages to %@" = "Możesz teraz wysyłać wiadomości do %@";
"You can now chat with %@" = "Możesz teraz wysyłać wiadomości do %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Podgląd powiadomień na ekranie blokady można ustawić w ustawieniach.";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "%@ заблокирован";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "заблокировано администратором";
/* No comment provided by engineer. */
@@ -4405,7 +4405,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Вы можете сделать его видимым для ваших контактов в SimpleX через Настройки.";
/* notification body */
"You can now send messages to %@" = "Вы теперь можете отправлять сообщения %@";
"You can now chat with %@" = "Вы теперь можете общаться с %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Вы можете установить просмотр уведомлений на экране блокировки в настройках.";
+1 -1
View File
@@ -3301,7 +3301,7 @@
"You can hide or mute a user profile - swipe it to the right." = "คุณสามารถซ่อนหรือปิดเสียงโปรไฟล์ผู้ใช้ - ปัดไปทางขวา";
/* notification body */
"You can now send messages to %@" = "ตอนนี้คุณสามารถส่งข้อความถึง %@";
"You can now chat with %@" = "ตอนนี้คุณสามารถส่งข้อความถึง %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "คุณสามารถตั้งค่าแสดงตัวอย่างการแจ้งเตือนบนหน้าจอล็อคผ่านการตั้งค่า";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "engellendi %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "yönetici tarafından engellendi";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Ayarlardan SimpleX kişilerinize görünür yapabilirsiniz.";
/* notification body */
"You can now send messages to %@" = "Artık %@ adresine mesaj gönderebilirsin";
"You can now chat with %@" = "Artık %@ adresine mesaj gönderebilirsin";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Kilit ekranı bildirim önizlemesini ayarlar üzerinden ayarlayabilirsiniz.";
+2 -2
View File
@@ -647,7 +647,7 @@
/* rcv group event chat item */
"blocked %@" = "заблоковано %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "заблоковано адміністратором";
/* No comment provided by engineer. */
@@ -4414,7 +4414,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "Ви можете зробити його видимим для ваших контактів у SimpleX за допомогою налаштувань.";
/* notification body */
"You can now send messages to %@" = "Тепер ви можете надсилати повідомлення на адресу %@";
"You can now chat with %@" = "Тепер ви можете надсилати повідомлення на адресу %@";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "Ви можете налаштувати попередній перегляд сповіщень на екрані блокування за допомогою налаштувань.";
+2 -2
View File
@@ -599,7 +599,7 @@
/* rcv group event chat item */
"blocked %@" = "已封禁 %@";
/* blocked chat item */
/* marked deleted chat item preview text */
"blocked by admin" = "由管理员封禁";
/* No comment provided by engineer. */
@@ -4111,7 +4111,7 @@
"You can make it visible to your SimpleX contacts via Settings." = "你可以通过设置让它对你的 SimpleX 联系人可见。";
/* notification body */
"You can now send messages to %@" = "您现在可以给 %@ 发送消息";
"You can now chat with %@" = "您现在可以给 %@ 发送消息";
/* No comment provided by engineer. */
"You can set lock screen notification preview via settings." = "您可以通过设置来设置锁屏通知预览。";