From fc3952e805b46915da87dee03f3b6b3e3a64e318 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 29 Jun 2023 18:23:33 +0200 Subject: [PATCH 001/169] avoid NullPointerException in WebViewActivity.onCreate(Bundle state, boolean ready) --- src/org/thoughtcrime/securesms/WebViewActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/WebViewActivity.java b/src/org/thoughtcrime/securesms/WebViewActivity.java index 12fc967ef..ea9e3ba1a 100644 --- a/src/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/org/thoughtcrime/securesms/WebViewActivity.java @@ -18,6 +18,7 @@ import android.widget.ImageView; import android.widget.Toast; import androidx.annotation.RequiresApi; +import androidx.appcompat.app.ActionBar; import androidx.appcompat.widget.SearchView; import androidx.webkit.WebSettingsCompat; import androidx.webkit.WebViewFeature; @@ -71,7 +72,10 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity @Override protected void onCreate(Bundle state, boolean ready) { setContentView(R.layout.web_view_activity); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + } webView = findViewById(R.id.webview); webView.setWebViewClient(new WebViewClient() { From 5b4897a023ee3b9888f37766d88b348321bdc144 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 29 Jun 2023 18:25:51 +0200 Subject: [PATCH 002/169] remove redundant suppression in shouldInterceptRequest(WebView view, String url) --- src/org/thoughtcrime/securesms/WebViewActivity.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/WebViewActivity.java b/src/org/thoughtcrime/securesms/WebViewActivity.java index ea9e3ba1a..aa9b85b08 100644 --- a/src/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/org/thoughtcrime/securesms/WebViewActivity.java @@ -107,7 +107,6 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity } @Override - @SuppressWarnings("deprecation") public WebResourceResponse shouldInterceptRequest(WebView view, String url) { WebResourceResponse res = interceptRequest(url); if (res!=null) { From 67906e0c17739d93f195607c31d174175624c9a9 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 26 Jul 2023 12:56:12 +0000 Subject: [PATCH 003/169] chore: nix flake update --- flake.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 8d336f07d..3e1b6d61b 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1687378940, - "narHash": "sha256-xGPTFVCWzbQh3DwuKedetTIpq2p6vq36xHe7HrasqPU=", + "lastModified": 1690316394, + "narHash": "sha256-uiTwTicVz8fuwScghAXP/MGIJvtMEMiQdNJLQzf8o1g=", "owner": "tadfisher", "repo": "android-nixpkgs", - "rev": "28e855d3273cf858a3e233c7a591ad19b3066aed", + "rev": "ed6c49798b760b644911eae3f4b008fa41983ddf", "type": "github" }, "original": { @@ -29,11 +29,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1687173957, - "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", + "lastModified": 1688380630, + "narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=", "owner": "numtide", "repo": "devshell", - "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", + "rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205", "type": "github" }, "original": { @@ -47,11 +47,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1687171271, - "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1687171271, - "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -98,11 +98,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1686960236, - "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=", + "lastModified": 1690179384, + "narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86", + "rev": "b12803b6d90e2e583429bb79b859ca53c348b39a", "type": "github" }, "original": { @@ -114,11 +114,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1687488839, - "narHash": "sha256-7JDjuyHwUvGJJge9jxfRJkuYyL5G5yipspc4J3HwjGA=", + "lastModified": 1690327932, + "narHash": "sha256-Fv7PYZxN4eo0K6zXhHG/vOc+e2iuqQ5ywDrh0yeRjP0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f9e94676ce6c7531c44d38da61d2669ebec0f603", + "rev": "a9b47d85504bdd199e90846622c76aa0bfeabfac", "type": "github" }, "original": { @@ -158,11 +158,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1687400833, - "narHash": "sha256-rVENiSupjAE8o1+ZXNRIqewUzM2brm+aeme8MUrwl0U=", + "lastModified": 1690338181, + "narHash": "sha256-Sz2oQ9aNS3MVncnCMndr0302G26UrFUfPynoH2iLjsg=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "fc0a266e836c079a9131108f4334e5af219dbb93", + "rev": "b7f0b7b58b3c6f14a1377ec31a3d78b23ab843ec", "type": "github" }, "original": { From 432c7d29d64bc7e42ebd583841a10f927e498072 Mon Sep 17 00:00:00 2001 From: bjoern Date: Fri, 4 Aug 2023 22:27:04 +0200 Subject: [PATCH 004/169] update translations and help, add Luri Bakhtiari (#2628) * update translations: eo, fa * add language: bqi (Luri Bakhtiari) * update locale language name for arab language, see discussion at https://github.com/deltachat/deltachat-desktop/pull/3338#discussion_r1283543601 * update local help --- assets/help/it/help.html | 36 ++-- assets/help/nl/help.html | 20 +- assets/help/pl/help.html | 16 +- assets/help/sq/help.html | 41 ++-- assets/help/uk/help.html | 15 +- assets/help/zh_CN/help.html | 10 +- res/values-bqi/strings.xml | 392 ++++++++++++++++++++++++++++++++++++ res/values-eo/strings.xml | 52 +++++ res/values-fa/strings.xml | 4 +- res/values/arrays.xml | 3 +- 10 files changed, 512 insertions(+), 77 deletions(-) create mode 100644 res/values-bqi/strings.xml diff --git a/assets/help/it/help.html b/assets/help/it/help.html index fbb522e80..3f604a614 100644 --- a/assets/help/it/help.html +++ b/assets/help/it/help.html @@ -376,9 +376,9 @@ il modo in cui puoi eliminare il tuo account dipende dal tuo provider e-mail. Non abbiamo alcun controllo sul tuo account e-mail, quindi purtroppo non possiamo aiutarti in questo.

-

If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

+

Se vuoi mantenere l’account, +ma disinstallare Delta Chat, +si consiglia di uscire da qualsiasi chat di gruppo prima di disinstallare Delta Chat.

@@ -480,16 +480,14 @@ ad esempio, si vuole risparmiare spazio di archiviazione presso il proprio provi eliminare automaticamente i vecchi messaggi. I messaggi rimangono comunque sul dispositivo finché non li si cancella anche lì.

  • -

    To turn it on, go to Delete Old Messages → Delete Messages from Server -in the “Chats and Media” settings. -You can set a timeframe between “At once” and “After 1 year”. -All e-mails received by Delta Chat will be deleted from the server after this timeframe.

    +

    Per attivarlo, vai su Elimina i vecchi messaggi → Elimina messaggi dal server +nelle impostazioni “Chat e Media”. +Puoi impostare un intervallo di tempo compreso tra “Subito” e “Dopo 1 anno”. +Tutte le e-mail ricevute da Delta Chat verranno eliminate dal server dopo questo periodo di tempo.

  • -

    Si noti che se si utilizza Delta Chat su più di un dispositivo, è consigliabile lasciare i messaggi sul server, -finché anche l’altro dispositivo non potrà scaricarli. In questo caso, -si dovrebbe impostare la cancellazione automatica su “Dopo 1 giorno” o qualcosa di simile, -a seconda della frequenza con cui si accende l’altro dispositivo.

    +

    Tieni presente che se utilizzi Delta Chat su più di un dispositivo, è necessario lasciare il messaggio sul server con un tempo sufficiente +in modo che anche gli altri dispositivi(o) possano scaricarli.

  • @@ -1214,8 +1212,8 @@ indirizzo e-mail gruppo verificato, lo riconosceranno automaticamente. -

    Per conoscere i dettagli alla base di questo, leggi il nostro post sul blog -it.

    +

    Per conoscere i dettagli alla base di questo, leggi il nostro post +sul blog.

    @@ -1317,7 +1315,7 @@ problema per molte app legittime. Per ulteriori informazioni, vedi

    -

    The Delta Chat project underwent four independent security audits in the last years:

    +

    Il progetto Delta Chat è stato sottoposto a quattro verifiche di sicurezza indipendenti negli ultimi anni:

    • @@ -1354,11 +1352,11 @@ Puoi leggere ulteriori informazioni sull’audit rapporto completo qui.

    • -

      Beginning 2023, we fixed security and privacy issues with the “web -apps shared in a chat” feature, related to failures of sandboxing -especially with Chromium. We subsequently got an independent security -audit from Cure53 and all issues found were fixed in the 1.36 app series released in April 2023. -See here for the full background story on E2E security in the web.

      +

      A partire dal 2023, abbiamo risolto i problemi di sicurezza e privacy con le “web +app condivise in una chat”, relativa ai fallimenti del sandboxing +soprattutto con Chromium. Successivamente abbiamo ottenuto una sicurezza indipendente +verificata da Cure53 e tutti i problemi rilevati sono stati risolti nella serie di app 1.36 rilasciata nell’Aprile 2023. +Vedi qui per la storia completa sulla sicurezza E2E nel web.

    diff --git a/assets/help/nl/help.html b/assets/help/nl/help.html index 9792f197c..a05668652 100644 --- a/assets/help/nl/help.html +++ b/assets/help/nl/help.html @@ -14,7 +14,7 @@
  • Welke Android-rechten heeft Delta Chat nodig?
  • Wat is vastmaken, negeren en archiveren?
  • Wat betekent die groene stip?
  • -
  • How can I delete my account?
  • +
  • Hoe kan ik mijn account verwijderen?
  • Groepen @@ -375,22 +375,22 @@ leesbevestigingen hebt uitgeschakeld, dan wordt er geen groen stipje getoond tot iemand benaderd of iets in een groep plaatst..
  • -

    +

    - How can I delete my account? + Hoe kan ik mijn account verwijderen?

    -

    As you use an e-mail account for Delta Chat, -how you can delete your account depends on your e-mail provider. -We don’t have any control over your e-mail account, -so unfortunately we can’t help you with that.

    +

    Delta Chat maakt gebruik van je e-mailaccount, +dus de verwijderprocedure is afhankelijk van je provider. +We hebben geen zeggenschap over je account, +dus helaas kunnen we je daar niet bij helpen.

    -

    If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

    +

    Als je je account wilt behouden maar Delta Chat +niet wilt verwijderen, verlaat dan groeps- +gesprekken voordat je Delta Chat verwijdert.

    diff --git a/assets/help/pl/help.html b/assets/help/pl/help.html index feb919a51..0267e12a5 100644 --- a/assets/help/pl/help.html +++ b/assets/help/pl/help.html @@ -14,7 +14,7 @@
  • Jakich uprawnień potrzebuje Delta Chat?
  • Co oznacza przypinanie, wyciszanie i archiwizowanie?
  • Co oznacza zielona kropka?
  • -
  • How can I delete my account?
  • +
  • Jak mogę usunąć swoje konto?
  • Grupy @@ -332,22 +332,18 @@ aby wyciszyć czat, użyj menu czatu (Android/Desktop) lub profilu czatu (iOS).<
  • Z drugiej strony inni nie zawsze „zobaczą, że jesteś online”. Jeśli wyłączyłeś potwierdzenia odczytu, nie zobaczą oni zielonej kropki, dopóki nie wyślesz do nich wiadomości lub nie napiszesz do grupy, w której również się znajdują.
  • -

    +

    - How can I delete my account? + Jak mogę usunąć swoje konto?

    -

    As you use an e-mail account for Delta Chat, -how you can delete your account depends on your e-mail provider. -We don’t have any control over your e-mail account, -so unfortunately we can’t help you with that.

    +

    Gdy korzystasz z konta e-mail w Delta Chat, sposób usunięcia konta zależy od dostawcy poczty e-mail. +Nie mamy żadnej kontroli nad twoim kontem e-mail, więc niestety nie możemy ci w tym pomóc.

    -

    If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

    +

    Jeśli chcesz zachować konto, ale odinstalować Delta Chat, zaleca się opuszczenie każdego czatu grupowego przed odinstalowaniem Delta Chat.

    diff --git a/assets/help/sq/help.html b/assets/help/sq/help.html index 585596348..19e61b775 100644 --- a/assets/help/sq/help.html +++ b/assets/help/sq/help.html @@ -14,7 +14,7 @@
  • Ç’leje lyp Delta Chat-i?
  • Ç’do të thotë Fiksim, Heshtim, Arkivim?
  • Ç’do të thotë pika e gjelbër?
  • -
  • How can I delete my account?
  • +
  • Si mund ta fshij llogarinë time?
  • Grupe @@ -390,22 +390,22 @@ u merakosni dhe lëruni ca kohë ;-)
  • t’u dërgoni një mesazh, ose të shkruani te një grup ku bëjnë pjesë edhe ata. -

    +

    - How can I delete my account? + Si mund ta fshij llogarinë time?

    -

    As you use an e-mail account for Delta Chat, -how you can delete your account depends on your e-mail provider. -We don’t have any control over your e-mail account, -so unfortunately we can’t help you with that.

    +

    Ngaqë për Delta Chat-in përdorni një llogari email, +se si mund të fshini llogarinë tuaj, varet nga shërbimi juaj email. +Nuk kemi fuqi mbi llogarinë tuaj email, +ndaj, mjerisht, s’mund t’ju ndihmojmë për këtë.

    -

    If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

    +

    Nëse doni ta mbani llogarinë, +por të çinstaloni Delta Chat-in, +rekomandohet të braktisni çfarëdo grupi fjalosjeje, para çinstalimit të Delta Chat-it.

    @@ -509,10 +509,10 @@ të zgjidhni të fshihen automatikisht mesazhet e vjetër. Mbeten ende në pajis deri sa t’i fshini edhe prej andej.

  • -

    To turn it on, go to Delete Old Messages → Delete Messages from Server -in the “Chats and Media” settings. -You can set a timeframe between “At once” and “After 1 year”. -All e-mails received by Delta Chat will be deleted from the server after this timeframe.

    +

    Për ta vënë në punë, kaloni te Fshi Mesazhe të Vjetër → Fshiji Mesazhet te Shërbyesi +te rregullimet “Fjalosje dhe Media”. +Mund të caktoni një interval kohor, mes “Menjëherë” dhe “Pas 1 viti”. +Krejt email-et e marrë nga Delta Chat-i do të fshihen te shërbyesi pas këtij intervali kohor.

  • Kini parasysh se, nëse e përdorni Delta Chat-in në më shumë se një pajisje, duhet t’i @@ -1369,7 +1369,7 @@ email-i me çfarëdo aplikacioni

  • -

    The Delta Chat project underwent four independent security audits in the last years:

    +

    Projekti Delta Chat ka pasur katër auditime të pavarur sigurie gjatë viteve të fundit:

    diff --git a/assets/help/uk/help.html b/assets/help/uk/help.html index dd141d250..096dafc9b 100644 --- a/assets/help/uk/help.html +++ b/assets/help/uk/help.html @@ -14,7 +14,7 @@
  • Яких дозволів потребує Delta Chat?
  • Що значить Закріплення, Приглушення, Архівування?
  • Що означає зелена точка?
  • -
  • How can I delete my account?
  • +
  • Як мені видалити свій обліковий запис?
  • Групи @@ -345,22 +345,17 @@ – З іншого боку, інші не завжди «побачать, що ви онлайн». Якщо ви вимкнули сповіщення про прочитання, вони не побачать зелену крапку, доки ви не надішлете їм повідомлення або напишете у групу, до якої вони входять.
  • -

    +

    - How can I delete my account? + Як мені видалити свій обліковий запис?

    -

    As you use an e-mail account for Delta Chat, -how you can delete your account depends on your e-mail provider. -We don’t have any control over your e-mail account, -so unfortunately we can’t help you with that.

    +

    Оскільки ви використовуєте обліковий запис електронної пошти для Delta Chat, спосіб видалення облікового запису залежить від вашого постачальника послуг електронної пошти. Ми не маємо жодного контролю над вашим обліковим записом електронної пошти, тому, на жаль, ми не можемо вам у цьому допомогти.

    -

    If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

    +

    Якщо ви хочете зберегти обліковий запис, але видалити Delta Chat, перед видаленням Delta Chat рекомендується покинути будь-які групові чати.

    diff --git a/assets/help/zh_CN/help.html b/assets/help/zh_CN/help.html index 4e0b63d2b..6677e3ccb 100644 --- a/assets/help/zh_CN/help.html +++ b/assets/help/zh_CN/help.html @@ -7,14 +7,14 @@
  • 哪些消息会在 Delta Chat 中出现?
  • 如果希望收到我从未发送过消息的人的消息,该怎么办?
  • Delta Chat 支持图像、视频和其他附件吗?
  • -
  • How can I add or switch between multiple accounts?
  • +
  • 如何添加账户或在多个账户之间切换?
  • 谁会看见我的个人资料图片?
  • Delta Chat 支持 HTML 电子邮件吗?
  • 为什么我必须在 Delta Chat 中输入我的电子邮件密码? 这样安全吗?
  • Delta Chat 需要哪些权限?
  • 固定、静音、归档是什么意思?
  • 绿色圆点代表什么?
  • -
  • How can I delete my account?
  • +
  • 如何删除我的账户?
  • 群组 @@ -182,7 +182,7 @@

    - How can I add or switch between multiple accounts? + 如何添加账户或在多个账户之间切换?

    @@ -348,10 +348,10 @@ Archived chats remain accessible above the chat list or via search.

  • 另一方面,其他人并不总是能“看到您在线”。如果您关掉了已读回执,那么在您发消息给其他人以及和他们的共有群组前,其他人将不会看到绿色圆点。
  • -

    +

    - How can I delete my account? + 如何删除我的账户?

    diff --git a/res/values-bqi/strings.xml b/res/values-bqi/strings.xml new file mode 100644 index 000000000..5d3f65d74 --- /dev/null +++ b/res/values-bqi/strings.xml @@ -0,0 +1,392 @@ + + + + Dêltā Čat + + raď + roftênê pitiniďên + harêy + na + pêsand + rušên + kur + pîš farz + pîš farz (%1$s) + pîš farz (jurê ro\') + sêfârêši + hičkoyêki + xotkār + saxtger + gušiďên + dānlod + honêy dānlod êbu... + gušiďên zamima + avoďên + zênu avoďên + pāk kerdên + zêbār + vê ru kerdên + êmuji + zamima + vorgaštên + taiď biďa + bastên + + zênu bêfêšn + + bāyêguvi + + bêdar zêyďên zê bāyêguvi + bî dong + zaft + goftoloft + vārasgar + porofāyl + balgê asli + nāhāďên pā goftoloft + nêšow dāďên payomê kāmêl + nêšow dāďên payomê kāmêl mênê morurgar + + poy nê xonde biďe bêza + + xonde vâbiďa + + honêy bār êvane... + bîďār kerdên + faāl kerdên + bār vani šîvātā zê dar + hamiša + him ya kêrat + nêšow dāďên hošdār + nêšow dāďên razm + bîďār kerdên razm + sako na + hič + yadamow... + anjom vâbi + āflāyn + + niyâyi + xatā + xatā: %1$s + %1$s najost + mênê virga lefgiri vâbi. + homdangal + nêšuvi imêyl + razm + razmê mowjud + sako + + bêpā + amru + duš + i hafta + i mā + haftê zitari + mā zitari + + ritorê dindâyi mênê %1$s + + ritorê dindâyi %1$s + ritorê dindâyi: diyār nî + + + %d dîqa + %d dîqa + + + + %d sāat + %d sāat + + + %d čat + %d čat + + + %d homdang + %d homdang + + + %d payom + %d payom + + + %d mėntor + %d mėntor + + + + %d tā pêsand vâbi + %d tā pêsand vâbi + + + mo + pîš hîl + šîvāt + + vêlom + gif + + êstikêr + šîvātā + dong + payomê dong + film + sanadā + homdang + homdang taiď biďa. + šîvātgėr + + gêrîďên + ālêštê šîvātgêr + ālêštê vaziyat poy balga + jāga + jāgayal + šîvātmāl + šîvātā vo filmā + fāyl + fāylā + + barnoma + + barnomêyal + fāylā vo barnomêyal + nāšênās + + sawz + so\'r + kêvu + bênawš + êsbîď + + gap kerdên + qalêvê kučir + kučir + âdi + gap + qalêvê gap + + zêl + hovār + + + homdangê nu + goftoloftê nu + jarga nu + + jarga yā onvānê nu + jarga taiď biďê nu + + nomga Broadcast + nomgayal Broadcast + nomga Broadcast nu + fêšnāďên + ālêštê jarga + nom vo šîvātê jarga + bāyêguvi kerdên goftoloft + bêdar zêyďên goftoloft zê bāyêguvi + êzāf kerdên zamima + ra\'ďên zê jarga + pāk kerdên poy goftoloft + + roftênê virgārê goftoloft + pāk kerdên payomā + pāk kerdên homdang + i jāga pāk bu? + lefgiri mênê virga + lefgiri ling + lefgiri hîl + lefgiri šîvāt + lefgiri imêyl + jā vandên zê virga + vêlom bê payom + bî dong kerdên vārasuviyā + vā dong kerdên + poy vārasgarā + + nêšow dāďên mênê goftoloft + yakrasuvi + qêvul + pêšk + vāstāďên + ra\'ďên bê lam + ra\'ďên bê ro\' + hayâri + pêsandê poy + pêsandê goftoloft + pêsandê bištar + ālêštê nom + sāmovā + pîš ra\'ďa + niyaštên porofāyl + gap kerdên + kučir kerdên + zaft kerdên gozārêš + guzinêyalê bištar + ra\'ďên bê payom + payomā dasgā + payomā mêni + ālêštê homdang + + disniďên goftoloft + + disniďên + kodê bončak + bî dong kerdên si 1 sāat + bî dong kerdên si 2 sāat + bî dong kerdên si 1 ru + bî dong kerdên si 7 ru + bî dong kerdên si hamiša + + si 5 dîqa + si 30 dîqa + si 1 sāat + si 2 sāat + si 6 sāat + + fāyl mênê \"%1$s\" zaft vâbi. + + goftoloftê vidiyoyi + mokêš bê goftoloft vidiyoyi + + êxuy %d payom pāk bu? + êxuy %d payom pāk bu? + + goftoloft vā %1$s? + pāk kerdên %s? + + pāk kerdên %1$s zê jarga? + + %1$s zê nomga Broadcast pāk bu? + êxuy i lingê nê buguši? + + + + homdangal + bî homdang. + + + ya payom bêza + + %d payomê nu + %d payomê nu + + si raď kerdên bêkašês + yakrasuvi vā + payom + darxāst + payomi nî. + payomāyî ke si xom fêšnāme. + payomā zaft biďa + + zaft vâbi + zaft vê onvān + zênu si fêšnāďênê payom taqalā ko + + nomga posti + + fêšnāďên \"%1$s\" vê... + fêšnāďên payom vê... + + nêšow dāďên jā pā + + pitiniďên + + nomê jarga + šîvātê jarga + pāk kerdên šîvātê jarga + ālêštê šîvātê jarga + vorkêlê jarga + avordênê mêntor + homdang + jarga + šîvātmāl + sanadā + lingā + naqša + nêšow dāďên vārasgar + fêšnāďên payom + + zaft kerdên mênê %1$s + + honêy menpiz êbu... + + honêy vê ru êbu... + + menpiz vâbi + honêy fêšnāďe êbu... + + payomā + vê ru kerdên poy + nomê to + nêšow dāďên + zow + goftoloftā + hêndā hîlê payom + gozārêš + pêsand zê šîvātmāl + poy + + tā saqfe %1$s + + payom %1$s + pêsandê šîvātê porofāyl + pāk kerdên šîvātê porofāyl + ālêštê porofāyl + + + natijêyalê pitiniďên + nemāďā + bêyraqā + + + + pāk kerdên payomā qaďimi + pāk kerdên payomā zê dasgā + pāk kerdên payomā zê sêrvêr + + ya kêrat + ba\'ďê 30 sâniya + ba\'ďê 1 dîqa + ba\'ďê 5 dîqa + ba\'ďê 30 dîqa + ba\'ďê 1 sāat + ba\'ďê 1 ru + ba\'ďê 1 hafta + ba\'ďê 4 hafta + ba\'ďê 5 hafta + ba\'ďê 1 sāl + + + %1$s zê jarga ra\'ď. + %1$s mêntor vâbi. + %1$s taiď vâbi. + %1$s taiď vâbi. + + taiď vâbiďa vê das %1$s + vėlom + payomė nu + nom vo payom + têynā nom + nom yā payomi nî + + + zow + fāyl + vê dar zêyďên + ālêšt + jā goro kerdên + lefgiri + jā vandên + gušiďênê dêltā čat + pāk kerdên payom + pāk kerdên + zaft + nom + pêsandê šîvātê jarga + fêšnāďe vâbi + gêrîďe vâbi + nêšow dāďênê nimdari + gušiďênê sāmovā + diff --git a/res/values-eo/strings.xml b/res/values-eo/strings.xml index d2f5b17a3..0bea5dd58 100644 --- a/res/values-eo/strings.xml +++ b/res/values-eo/strings.xml @@ -18,6 +18,7 @@ Malferma Elŝuti Elŝutado... + Malfermu aldonaĵon Aliĝi Realiĝi Forigi @@ -26,6 +27,7 @@ Emoji Aldonaĵo Reen + Konfirmita Fermi Plusendi @@ -36,20 +38,30 @@ Malarĥivi Muta sciigoj Memviŝontaj mesaĝoj + Aplikebla al ĉiuj anoj de tiu ĉi babilejo kiuj uzas Delta Chat; ili ankoraŭ povas kopii, konservi kaj plusendi mesaĝojn, kaj uzi aliajn retpoŝtajn klientojn. Konservi Babilo Aŭdovidaĵoj Profilo Ĉefa menuo Komenci Babiladon + Afiŝu la tutan mesaĝon... + Afiŝu la tutan mesaĝon en la retumilo... + + Marki ĉiujn legitaj Legi Ŝarĝado... Kaŝi Aktivigi + Ŝargu forajn bildojn + + La foraj bildoj povas spuri vin.\n\nTiu ĉi agordo povas ankaŭ ŝargi tiparojn kaj aliajn enhavojn. Malŝaltite, enkorpigitaj aŭ kaŝmemorigitaj bildoj povas aperi.\n\nŜargu forajn bildojn? Ĉiam + Ĉiam ŝargu forajn bildojn Unufoje + Afiŝu averton Montri pasvorton Kaŝi pasvorton Ne nun @@ -57,6 +69,7 @@ Unu momenton… Farita Malfari + Nekonektite Sekva Eraro @@ -79,6 +92,11 @@ Ĉi-monate Pasint-semajne Pasint-monate + + Laste vidita je%1$s + + Laste vidita %1$s + Laste vidita: nedisponebla informo %d min @@ -105,17 +123,31 @@ %d ano %d anoj + + %dricevonto + %dricevontoj + + + + %delektitaj + %delektita + + Mi Malneto Bildo Respondi Gif + + Glumarko Bildoj Sonaĵo Voĉmesaĝo Plusendita Plusendita mesaĝo + + Plusendita de %1$s Filmo Dokumentoj Kontakto @@ -123,8 +155,12 @@ Fotilo Kapti + Elektu alian kameraon + Baskulu el/al la plena ekrano Loko + Lokoj Galerio + Bildoj kaj videoj Dosiero Dosieroj @@ -143,6 +179,7 @@ Malva Blanka + Grandeco Ege malgranda Malgranda Normala @@ -174,20 +211,29 @@ Aldoni kunsendaĵon Forlasi grupon Forigi babilon + + Viŝi la babilejon + Ĉu vi certas, ke vi deziras forigi \"%1$s\"? Forigi mesaĝojn Forviŝi Kontakton Ĉu forigi tiun ĉi lokon? Mesaĝ-detaloj Kopii al tondujo + Kopii tion, kion vi elstarigis Kopii Ligilon Kopii Tekston Kopii Bildon + Kopii retpoŝtaĵon + Alglui el la tondujo Plusendi mesaĝon Respondi al mesaĝo Silentigi sciigojn Malsilentigi Eksporti aldonaĵon + Eksporti aldonaĵojn Ĉiuj aŭvidaĵoj + + Afiŝu en la babilejo Kunhavigi Bloki @@ -199,7 +245,9 @@ Rulumi al la malsupro Rulumi al la supro Helpo + Politiko pri privateco Elekti ĉion + Elektu babilejon Elekti pli Redakti nomon Agordoj @@ -208,6 +256,10 @@ Zomi Malzomi Konservi protokolon + Pli da ebloj + Lernu la ortografion + Iru al mesaĝo + Kopiu JSON Konigi lokon al ĉiuj grupanoj Aparataj mesaĝoj Loke generitaj mesaĝoj diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index f43470d6a..b110ea3c8 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -865,7 +865,7 @@ https://meet.jit.si/$ROOM امکان رمزگشایی کد کیوآر وجود ندارد آیا می خواهید به گروه\"%1$s\" ملحق شوید؟ اثرانگشت اسکن شده با انچه که برای %1$sمشاهده شده بود انطباق ندارد. - این کیوآر حاوی یک شناساگر است ولی ادرس رایانامهی در آن نیست. \n\n برای یک تأییدیه به روش‌های دیگر لطفا ابتدا یک ارتباط رمزگذاری شده با دریافت کننده برقرار کنید. + این کیوآر حاوی یک شناساگر است ولی ادرس رایانامه‌ای در آن نیست. \n\n برای یک تأییدیه به روش‌های دیگر لطفا ابتدا یک ارتباط رمزگذاری شده با دریافت کننده برقرار کنید. کیوآر کد اسکن شده:\n\n %1$s آدرس اینترنتی کیوآر اسکن شده:\n\n %1$s اثر انگشت @@ -1097,7 +1097,7 @@ GNU GPL ورژن ۳ - نکات برجسته 1.36/n/n💻📱 از دلتاچت در همه دستگاه‌های خود به راحتی استفاده کنید - فقط سه مرحله ساده را در \"تنظیمات / افزودن دستگاه دوم\" (تجربی) دنبال کنید/n/n🖼🔍 آیا تا به حال به دنبال 1 تصویر هستید و نمی توانید چت را به یاد بیاورید؟ \"همه رسانه\" از منوی اصلی متعلق به شماست!/n/nچه چیز دیگری؟ اعلان ها برای همه حساب ها، پاک کردن چت، و موارد دیگر در %1$s + نکات برجسته ۱.۳۶/n/n💻📱 از دلتاچت در همه دستگاه‌های خود به راحتی استفاده کنید - فقط سه مرحله ساده را در \"تنظیمات / افزودن دستگاه دوم\" (تجربی) دنبال کنید/n/n🖼🔍 آیا تا به حال به دنبال 1 تصویر هستید و نمی توانید چت را به یاد بیاورید؟ \"همه رسانه\" از منوی اصلی متعلق به شماست!/n/nچه چیز دیگری؟ اعلان ها برای همه حساب‌ها، پاک کردن چت، و موارد دیگر در %1$s ما در اینجا زیاد در مورد امنیت صحبت نمی کنیم، اما مطمئن باشید، ما اهمیت می دهیم: برای اخبار خوب اخیر به %1$s مراجعه کنید 👌 diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 6b1c40a23..95d2ba9cb 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -22,6 +22,7 @@ Hrvatski Italiano Lietuvių kalba + Luri Bakhtiar Magyar nyelv Nederlands Norsk Bokmål @@ -40,7 +41,7 @@ Српски Українська Български - عربى + العربیة فارسی کوردی 日本語 From fdc1de2d701b1f1dc5de41cec61af3bec66daa66 Mon Sep 17 00:00:00 2001 From: bjoern Date: Fri, 4 Aug 2023 22:57:19 +0200 Subject: [PATCH 005/169] update verified icon (#2629) --- res/drawable-xhdpi/ic_verified.png | Bin 1209 -> 0 bytes res/drawable/ic_verified.xml | 8 ++++++++ 2 files changed, 8 insertions(+) delete mode 100644 res/drawable-xhdpi/ic_verified.png create mode 100644 res/drawable/ic_verified.xml diff --git a/res/drawable-xhdpi/ic_verified.png b/res/drawable-xhdpi/ic_verified.png deleted file mode 100644 index b95c6f6a5f4c275e9f3f2205be645d1399e5617d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1209 zcmV;q1V;ObP)0YMX*9aDo(VZsH6zlw6ig3Y)z<1HksYI*N3^=%ue_J!0{x$D;mZ%;vbD1 z98aczSAYX`Vtokg@?9}m$G;q2wt|&E1b(`L=XSlZGY2Xvz z73Er~wt#1WBdpBW4E$WlY`l_EzzeM0csb6CgH2%L)katKO}EE0ED}D&s|Bw%!7^%^ zf=VGL!DZm={{@B$deU&XPw{Yj1W&B~4XoN~TOCi@zALWu@h0F9(Q#N6^m-d^Ou=vwW_k>bwD_tTn~JigaUM>;Po!WXSYb6TC2#2C~zFQAp`GpM^LGviOq+K zZzg8>`|=D*RpqJ$I1X&GfH#xXtbk4%-sn>7=u{wKXP07?fTNQJvtd-88#A!4TXA<= z1QiAZQgQ739Q`8;1g&c@jU|<41G_9>N3FfP!G^7E5j0egGvTFminM?u69%0&yxpz1 zuU#Q!1T9H8UMTWjK8T>ES+5qi8IC8*x`(S)EP%Um@NSQ!C$0C+fH?_YTryZ|!=q~! zp=AjJf6lRYBw#w-j%AsRnm`(kC&z%UTGgt6``e(uThguJ0x)zhgff~;S;AN2MfQ#a zOr~bY;;kdx(vGu0zZf#QUl}A!HFXK^8pv^9JXyYg93acfcJs1T2`S~ zeR3N1_=|ARPz5I@iuC78j9EESDH~K%>W{!7;k)8DEoIKsIwvaducu*uK~M;yJ`E%c zju+`44LB#Vq?<$Mb#|ZgU2!3PEp7%pUG7V(L4jew;~ntYddV+SQF`-6mR0HWa#ng4 z*y6jQ=y(z229P!dwh;dXijJ*n-Nz;1C@`}E>ca;HmVkBM zr2(gbx3sFfR^sCf@T%{M{1RQ=Gb9NW6c#1!cHmxMoenq!+y*?-1pYfPq!E0rl7AkV$Yi_upM|%3kRF1F1`Z>d{ + + + From 31e5724592435fe4d42f2204d91b651fa349088d Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 4 Aug 2023 23:03:19 +0200 Subject: [PATCH 006/169] update deltachat-core-rust to 'chore(release): prepare for 1.119.0' of 'stable' --- jni/deltachat-core-rust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index d76275310..e43f9066d 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit d762753103bae64241a7edffd8eee5cc389c9a4b +Subproject commit e43f9066d8830b57209c6e205e2f1e3af6959b97 From a80fcf32a6d840af4778f854d83ed2961cab3782 Mon Sep 17 00:00:00 2001 From: bjoern Date: Sat, 5 Aug 2023 01:04:32 +0200 Subject: [PATCH 007/169] prepare 1.40.0 (#2630) * update CHANGELOG for 1.40, core part * update CHANGELOG for 1.40, android part * bump version to 1.40 --- CHANGELOG.md | 25 +++++++++++++++++++++++++ build.gradle | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcfc4ccda..7b564a684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Delta Chat Android Changelog +## v1.40.0 +2023-08 + +* use image editor for avatar selection when possible +* allow media from blob: and data: in webxdc +* optimized native library size +* improve loading screen in dark mode +* improve IMAP logs +* update "verified icon" +* fix webxdc issues with dark mode +* fix crash in android 4.2 or older when opening a HTML message in full message view +* fix: avoid IMAP move loops when DeltaChat folder is aliased +* fix: accept webxdc updates in mailing lists +* fix: delete webxdc status updates together with webxdc instance +* fix: prevent corruption of large unencrypted webxdc updates +* fix "Member added by me" message appearing sometimes within wrong context +* fix core panic after sending 29 offline messages +* fix: make avatar in qr-codes work on more platforms +* fix: preserve indentation when converting plaintext to HTML +* fix: remove superfluous spaces at start of lines when converting HTML to plaintext +* fix: always rewrite and translate member added/removed messages +* add Luri Bakhtiari translation, update other translations and local help +* update to core119 + + ## v1.38.2 2023-06 diff --git a/build.gradle b/build.gradle index ae37d2199..97c35dfb5 100644 --- a/build.gradle +++ b/build.gradle @@ -98,8 +98,8 @@ android { useLibrary 'org.apache.http.legacy' defaultConfig { - versionCode 658 - versionName "1.38.2" + versionCode 659 + versionName "1.40.0" applicationId "com.b44t.messenger" multiDexEnabled true From 254a78bb029665a2c1abbc5e61efcc59171c26ec Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 7 Aug 2023 10:30:43 +0200 Subject: [PATCH 008/169] typo --- jni/deltachat-core-rust | 2 +- res/values/arrays.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index e43f9066d..e12044e6a 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit e43f9066d8830b57209c6e205e2f1e3af6959b97 +Subproject commit e12044e6af0b0f8285b0b1f7bc51c102072d0404 diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 95d2ba9cb..9661cf35a 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -22,7 +22,7 @@ Hrvatski Italiano Lietuvių kalba - Luri Bakhtiar + Luri Bakhtiari Magyar nyelv Nederlands Norsk Bokmål From 8c3728c4c2e3402a6a6f6dff6654fc72e9fc497d Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 12 Aug 2023 13:50:48 +0200 Subject: [PATCH 009/169] add f-droid changelog --- metadata/en-US/changelogs/6594.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 metadata/en-US/changelogs/6594.txt diff --git a/metadata/en-US/changelogs/6594.txt b/metadata/en-US/changelogs/6594.txt new file mode 100644 index 000000000..a0ea3e8f0 --- /dev/null +++ b/metadata/en-US/changelogs/6594.txt @@ -0,0 +1,5 @@ +* use image editor for avatar selection when possible +* improve loading screen in dark mode +* update "verified icon" +* add Luri Bakhtiari translation, update other translations +* lots of bug fixes From ced9a82cf7c7bc36f43a5d78d9306c1258d2b7af Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 12 Aug 2023 14:21:19 +0200 Subject: [PATCH 010/169] update amazon steps in release-checklist --- docs/release-checklist.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/release-checklist.md b/docs/release-checklist.md index a5848f96d..c52d566ed 100644 --- a/docs/release-checklist.md +++ b/docs/release-checklist.md @@ -97,11 +97,12 @@ This may take some days. on : -12. a) for "Delta Chat", select tab "Add upcoming version" - b) at "App Information" hit "Edit" abottom and then "Replace APK" atop, - upload the APK from above - c) on the same tab, add "Release notes" from CHANGELOG.md, "Save" - d) hit "Submit app" at the upper right corner +12. a) for "Delta Chat", select "Add upcoming version" on the left + b) at "Step 1 / Existing file(s)" hit "Replace", upload the APK from above + c) on the "Step 1" page, add "Release notes" from CHANGELOG.md, hit "Next" + d) on "Step 2" page: "Does your app collect or transfer user data to third parties?" -> No, then "Next" + e) on "Step 3" page: "Next" + f) on "Step 4" page: "Submit app" ## Releases on Apklis, Passkoocheh From 5c51339ccc14b328864329acfdf59fa89e746a76 Mon Sep 17 00:00:00 2001 From: bjoern Date: Sat, 12 Aug 2023 22:56:39 +0200 Subject: [PATCH 011/169] set correct mime type for .wasm files (#2636) in case, getMimeTypeFromExtension() fails to figure out the mime type for .wasm files, we set application/wasm manually afterwards --- src/org/thoughtcrime/securesms/WebxdcActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index 303b68f48..22ea131a9 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -238,6 +238,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE if (mimeType == null) { switch (ext) { case "js": mimeType = "text/javascript"; break; + case "wasm": mimeType = "application/wasm"; break; default: mimeType = "application/octet-stream"; Log.i(TAG, "unknown mime type for " + rawUrl); break; } } From d9effe91381ffef0cefe2f1a9ad3079fa282a912 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 19 Aug 2023 10:26:10 +0000 Subject: [PATCH 012/169] update deltachat-core-rust to 'chore(release) prepare for 1.119.1' of 'v1.119.1' --- jni/deltachat-core-rust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index e12044e6a..d70c1d48b 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit e12044e6af0b0f8285b0b1f7bc51c102072d0404 +Subproject commit d70c1d48b59e06948c29e136e71598d3521f799d From 12ca77ab012eeb723ceb688d91cbe4ce754bbe43 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 19 Aug 2023 12:38:15 +0200 Subject: [PATCH 013/169] create 1.40.1 release --- CHANGELOG.md | 7 +++++++ build.gradle | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b564a684..69c044a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Delta Chat Android Changelog +## v1.40.1 +2023-08 + +* fix: correct core-submodule picked up by f-droid +* update to core119.1 + + ## v1.40.0 2023-08 diff --git a/build.gradle b/build.gradle index 97c35dfb5..a7cc38fda 100644 --- a/build.gradle +++ b/build.gradle @@ -98,8 +98,8 @@ android { useLibrary 'org.apache.http.legacy' defaultConfig { - versionCode 659 - versionName "1.40.0" + versionCode 660 + versionName "1.40.1" applicationId "com.b44t.messenger" multiDexEnabled true From 859686d2fc769f69a4697b9474b5c2b505006f87 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 19 Aug 2023 10:40:46 +0000 Subject: [PATCH 014/169] F-Droid changelog --- metadata/en-US/changelogs/6600.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 metadata/en-US/changelogs/6600.txt diff --git a/metadata/en-US/changelogs/6600.txt b/metadata/en-US/changelogs/6600.txt new file mode 100644 index 000000000..a0ea3e8f0 --- /dev/null +++ b/metadata/en-US/changelogs/6600.txt @@ -0,0 +1,5 @@ +* use image editor for avatar selection when possible +* improve loading screen in dark mode +* update "verified icon" +* add Luri Bakhtiari translation, update other translations +* lots of bug fixes From a8822101aa92685fe8b01e21419a13604724d629 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 25 Aug 2023 21:31:05 +0000 Subject: [PATCH 015/169] chore(nix): nix flake update --- flake.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 3e1b6d61b..7fd8b23b9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1690316394, - "narHash": "sha256-uiTwTicVz8fuwScghAXP/MGIJvtMEMiQdNJLQzf8o1g=", + "lastModified": 1692995047, + "narHash": "sha256-L7PzSUM0bomAax+i+L+PoHokIgkD03m7MaiirIU5VDA=", "owner": "tadfisher", "repo": "android-nixpkgs", - "rev": "ed6c49798b760b644911eae3f4b008fa41983ddf", + "rev": "6529bfb4b0d5fc38de7ac9093a14edf04a2258c5", "type": "github" }, "original": { @@ -29,11 +29,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1688380630, - "narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=", + "lastModified": 1692793255, + "narHash": "sha256-yVyj0AE280JkccDHuG1XO9oGxN6bW8ksr/xttXcXzK0=", "owner": "numtide", "repo": "devshell", - "rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205", + "rev": "2aa26972b951bc05c3632d4e5ae683cb6771a7c6", "type": "github" }, "original": { @@ -47,11 +47,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { @@ -98,11 +98,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1690179384, - "narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=", + "lastModified": 1692734709, + "narHash": "sha256-SCFnyHCyYjwEmgUsHDDuU0TsbVMKeU1vwkR+r7uS2Rg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b12803b6d90e2e583429bb79b859ca53c348b39a", + "rev": "b85ed9dcbf187b909ef7964774f8847d554fab3b", "type": "github" }, "original": { @@ -114,11 +114,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1690327932, - "narHash": "sha256-Fv7PYZxN4eo0K6zXhHG/vOc+e2iuqQ5ywDrh0yeRjP0=", + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a9b47d85504bdd199e90846622c76aa0bfeabfac", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", "type": "github" }, "original": { @@ -158,11 +158,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1690338181, - "narHash": "sha256-Sz2oQ9aNS3MVncnCMndr0302G26UrFUfPynoH2iLjsg=", + "lastModified": 1692929460, + "narHash": "sha256-zdN6UVtEml7t0WQHVy0avsE+TWJLklXnqJyiPaOa8u0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b7f0b7b58b3c6f14a1377ec31a3d78b23ab843ec", + "rev": "673e2d3d2a3951adc6f5e3351c9fce6ad130baed", "type": "github" }, "original": { From 35a542b574ba2b663e8594111081a92f3eee5667 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 25 Aug 2023 23:32:34 +0000 Subject: [PATCH 016/169] build: update to Rust 1.72.0 --- flake.nix | 2 +- scripts/rust-toolchain | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index df197d0b5..9ee6f14a4 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,7 @@ buildInputs = [ android-sdk pkgs.openjdk17 - (pkgs.buildPackages.rust-bin.stable."1.70.0".minimal.override { + (pkgs.buildPackages.rust-bin.stable."1.72.0".minimal.override { targets = [ "armv7-linux-androideabi" "aarch64-linux-android" diff --git a/scripts/rust-toolchain b/scripts/rust-toolchain index 832e9afb6..0834888f5 100644 --- a/scripts/rust-toolchain +++ b/scripts/rust-toolchain @@ -1 +1 @@ -1.70.0 +1.72.0 From 716cc3396a246f98f0ebf4cf5e6e9e38e41a2afb Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 31 Aug 2023 14:10:58 +0200 Subject: [PATCH 017/169] update translations --- res/values-in/strings.xml | 11 +++++++++++ res/values-pt-rBR/strings.xml | 20 ++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index b1ce797c6..9a4f8fa20 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -18,6 +18,8 @@ Otomatis Ketat Buka + Unduh + Sedang Mengunduh Buka lampiran Gabung Gabung kembali @@ -27,8 +29,11 @@ Emoji Lampiran Kembali + Diverifikasi Tutup Teruskan + + Kirim ulang Arsip @@ -44,9 +49,15 @@ Mulai obrolan Tampilkan semua pesan... Tampilkan semua pesan di browser... + + Tandai Semua sebagai Telah Dibaca + + Baca Memuat... Sembunyikan + Aktifkan + Memuat Gambar Jarak Jauh Selalu Sekali Tunjukkan kata kunci diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 90b6621a5..5bf257a46 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -29,6 +29,7 @@ Emoji Anexo Voltar + Verificado Fechar Encaminhar @@ -95,6 +96,8 @@ Mês passado Visto pela última vez às %1$s + + Visto por último %1$s Visto pela última vez: desconhecido @@ -165,6 +168,7 @@ Trocar câmera Ativar modo tela cheia Localização + Localizações Galeria Imagens e vídeos Arquivo @@ -211,7 +215,7 @@ Ativar teclado de emojis Modificar grupo Nome e Imagem do grupo - Exibir todas as localizações + Todas as localizações Arquivar conversa Desarquivar conversa Inserir anexo @@ -253,6 +257,7 @@ Ajuda Política de privacidade Selecionar tudo + Selecionar Chat Selecionar mais Modificar nome Configurações @@ -423,6 +428,10 @@ Iniciar... Por favor, aceite o pedido de bate-papo primeiro. + + Enviar \"%1$s\" para… + Enviar Mensagem para… + Exibir localização no tempo. Exibir pegadas @@ -897,6 +906,8 @@ %1$srespondeu, esperando para ser adicionado ao grupo... %1$s verificado. Impossível verificar %1$s + + Verificado por %1$s A configuração Autocrypt mudou para %1$s Grupos verificados (experimental) fornecem segurança contra ataques ativos. Os membros são verificados com um segundo fator por outros membros e as mensagens são sempre criptografadas de ponta a ponta. @@ -1070,4 +1081,9 @@ Destaques da 1.36\n\n💻📱 Use o Delta Chat em todos os seus dispositivos facilmente - basta seguir três passos simples em \"Configurações / Adicionar segundo dispositivo\" (experimental)\n\n🖼🔍 Já procurou por uma imagem e não conseguiu se lembrar do bate-papo? \"Todas as mídias\" do menu principal é o seu!\n\nO que mais? Notificações para todas as contas, esvaziar bate-papo, e mais em %1$s Aqui não falamos muito sobre segurança, mas fique tranquilo, isso nos importa: Olhe em %1$s para boas notícias recentes 👌 - + + 1.38 foi lançado:\n\n📎 Limite superior de tamanho de anexos removido\n\n🗜️ Imagens PNG (capturas de tela!) agora também são compactadas\n\n⌨️ Para desenvolvedores: aplicativos melhores para bate-papos com sendToChat() e importFiles( ) (O que é Webxdc? → https://webxdc.org)\n\n… e mais em %1$s + + 1.38 foi lançado:\n\n🖼🔍 Já procurou por uma imagem e não conseguiu se lembrar do chat? Então o botão \"Todas as mídias\" é seu!\n\n🧹 \"Limpar bate-papo\" dos perfis\n\n📎 Limite superior de tamanho de anexos removido\n\n🗜️ Imagens PNG (capturas de tela!) agora também são compactadas\n\n… e mais em %1$s + + From 081e658a5d9027eb4c45fdcaa9afc1fb9742df37 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 31 Aug 2023 14:51:17 +0200 Subject: [PATCH 018/169] clarify new webxdc-send-to-chat-strings --- res/values/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index baf6ad48f..f3353555c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -413,8 +413,9 @@ Start… Please accept the chat request first. - + Send \"%1$s\" to… + Send Message to… From e02e2d7735e2fa5737b80893bc27280d7b5e69b3 Mon Sep 17 00:00:00 2001 From: bjoern Date: Thu, 31 Aug 2023 16:15:10 +0200 Subject: [PATCH 019/169] adapt videchat instance example (#2643) - meet.jit.si is no longer usable without registration, so does not work smoothly for ad-hoc calls - basicwebrtc: protocol is no longer build-in in any app, so that example does not make sense as well this is an intermediate step, we want to get rid of the example string completely and instead show the URLs of the predefined settings. closes https://github.com/deltachat/deltachat-android/issues/2642 --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index f3353555c..9955500c9 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -311,7 +311,7 @@ Tap to Open Video Chat Instance Your Video Chat Instance - Examples: https://meet.jit.si/$ROOM or basicwebrtc:https://your-server + Example: https://your-server.org/$ROOM If enabled, you can start a video chat from each chat. Requires a compatible app or a browser on both ends. Use \"%1$s\" to invite others to video chats?\n\nOnce set, you can start a video chat from each chat. This replaces any previous setting for video chats. Video chat invitation From 71e65f5a4a4926b7be7f7952a8fab60f1ec54472 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 31 Aug 2023 16:21:51 +0200 Subject: [PATCH 020/169] update translations --- res/values-bqi/strings.xml | 3 ++- res/values-de/strings.xml | 3 ++- res/values-es/strings.xml | 3 ++- res/values-fa/strings.xml | 3 ++- res/values-it/strings.xml | 3 ++- res/values-nl/strings.xml | 3 ++- res/values-pl/strings.xml | 3 ++- res/values-pt-rBR/strings.xml | 3 ++- res/values-sq/strings.xml | 3 ++- res/values-tr/strings.xml | 31 ++++++++++++++++--------------- res/values-uk/strings.xml | 3 ++- res/values-zh-rCN/strings.xml | 3 ++- 12 files changed, 38 insertions(+), 26 deletions(-) diff --git a/res/values-bqi/strings.xml b/res/values-bqi/strings.xml index 5d3f65d74..a0f0bf913 100644 --- a/res/values-bqi/strings.xml +++ b/res/values-bqi/strings.xml @@ -285,8 +285,9 @@ zênu si fêšnāďênê payom taqalā ko nomga posti - + fêšnāďên \"%1$s\" vê... + fêšnāďên payom vê... nêšow dāďên jā pā diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 28ca49e10..e8589ec16 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -413,8 +413,9 @@ Start… Bitte nehmen Sie zunächst die Chatanfrage an. - + Sende \"%1$s\" an… + Nachricht senden an… diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index b94449a7e..3109b1ca5 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -428,8 +428,9 @@ Iniciar… Primero acepte la solicitud de chat. - + Enviar \"%1$s\" a… + Enviar mensaje a… diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index b110ea3c8..2338d5fd6 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -417,8 +417,9 @@ https://meet.jit.si/$ROOM شروع... لطفاً اول درخواست گپ را قبول کنید. - + ارسال \"%1$s\" به... + ارسال پیام به... diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index e711cc774..8d42169f9 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -428,8 +428,9 @@ Avvia... Per favore, accetta prima la richiesta di chat. - + Invia \"%1$s\" a… + Invia Messaggio a... diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 6e8d5f1f5..10bd260e1 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -413,8 +413,9 @@ Starten… Accepteer eerst het gespreksverzoek. - + “%1$s” versturen naar… + Bericht versturen naar… diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 8c268b136..ed52f54c0 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -443,8 +443,9 @@ Uruchom… Najpierw zaakceptuj prośbę o czat. - + Wyślij „%1$s” do… + Wyślij wiadomość do… diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 5bf257a46..b2af7adcb 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -428,8 +428,9 @@ Iniciar... Por favor, aceite o pedido de bate-papo primeiro. - + Enviar \"%1$s\" para… + Enviar Mensagem para… diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index a5311f442..768c1a20d 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -411,8 +411,9 @@ Fillo… Ju lutemi, së pari pranoni kërkesën për fjalosje. - + Dërgoni “%1$s” për … + Dërgoni Mesazh për… diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 0754372f3..3dc69f73f 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -40,7 +40,7 @@ Arşivleme Sessize Al Kaybolan İletiler - Delta Chat\'i kullanıyorlarsa, bu sohbetin tüm üyelerine uygulanır; onlar hâlâ iletileri kopyalayabilir, kaydedebilir ve iletebilir ya da diğer e-posta istemcilerini kullanabilir. + Onlar Delta Chat\'i kullanıyorsa, bu sohbetin tüm üyelerine uygulanır; onlar hâlâ iletileri kopyalayabilir, kaydedebilir ve iletebilir ya da diğer e-posta istemcilerini kullanabilir. Kaydet Sohbet Ortam @@ -303,19 +303,19 @@ Dosya \"%1$s\" üzerine kaydedildi. Video Sohbeti - %1$s bir video sohbetine davet edilsin mi? + %1$s bir video sohbetine çağrılsın mı? Bu, her iki uçta da uyumlu bir uygulama ya da tarayıcı gerektirir. - %1$s video sohbetine davet etti. - Bir video sohbeti daveti gönderdiniz. + %1$s bir video sohbetine çağrıldı. + Bir video sohbeti çağrısı gönderdiniz. Katılmak için Dokunun Açmak için Dokunun Video Sohbeti Örneği Video Sohbeti Örneğiniz Örnekler: https://meet.jit.si/$ROOM ya da basicwebrtc:https://your-server Etkinleştirilirse, her sohbetten video sohbeti başlatabilirsiniz. Her iki uçta da uyumlu bir uygulama ya da bir tarayıcı gerektirir. - \"%1$s\" diğerlerini video sohbetlerine davet etmek için kullanılsın mı?\n\nBir kez ayarlandığında, her sohbetten video sohbeti başlatabilirsiniz. Bu, video sohbetleri için herhangi bir önceki ayarın yerini alır. - Video sohbeti daveti - Bir video sohbetine davet edildiniz; katılmak için %1$s öğesini tıklayın. + \"%1$s\" diğerlerini video sohbetlerine çağırmak için kullanılsın mı?\n\nBir kez ayarlandığında, her sohbetten video sohbeti başlatabilirsiniz. Bu, video sohbetleri için herhangi bir önceki ayarın yerini alır. + Video sohbeti çağrısı + Bir video sohbetine çağrıldınız; katılmak için %1$s öğesini tıklayın. Bu gruptan ayrılmak istediğinizden emin misiniz? @@ -413,8 +413,9 @@ Başlat… Lütfen önce sohbet isteğini kabul edin. - + \"%1$s\" dosyasını gönder… + İletiyi gönder… @@ -487,7 +488,7 @@ İkinci Aygıt Olarak Ayarla Birinci aygıtta “Ayarlar / İkinci Aygıt Ekle”ye gidin ve orada gösterilen kodu tarayın Diğer aygıttan gelen hesap bu aygıta kopyalansın mı? - İkinci aygıtı ayarlamaktan vazgeçilsin mi? + İkinci aygıtı ayarlamadan vazgeçilsin mi? Bu, panoya kopyalanan QR kodunu geçersizleştirecek. (deneysel, sürüm 1.36 gerekli) ℹ️ Hesap, ikinci aygıtınıza aktarıldı. @@ -528,7 +529,7 @@ E-Posta Üzerinden Sohbet. - Davet Kodunu Tara + Çağrı Kodunu Tara Dünyanın en geniş kitleli ulağı. Özgür ve bağımsız. Giriş Yap E-Posta Hesabınıza Giriş Yapın @@ -811,7 +812,7 @@ %1$s tarafından kaybolan iletiler zamanlayıcısı 1 gün olarak ayarlandı. Kaybolan iletiler zamanlayıcısını 1 hafta olarak ayarladınız. - %1$s tarafından kaybolan iletiler zamanlayıcısı 1 gün olarak ayarlandı. + %1$s tarafından kaybolan iletiler zamanlayıcısı 1 hafta olarak ayarlandı. Kaybolan iletiler zamanlayıcısını %1$s dakika olarak ayarladınız. @@ -865,14 +866,14 @@ Bu QR kodu, \"%1$s\" grubuna katılmak için diğerleri tarafından taranmış olabilir.\n\nQR kodu bu aygıtta etkin değil. QR Kodunu Etkinleştir - QR Davet Kodu + QR Çağrı Kodu %1$s katılıyor. %1$s doğrulandı. %1$s gruba katıldı. - QR Davet Kodu + QR Çağrı Kodu \"%1$s\" grubuna katılmak için bunu tarayın - QR Davet Kodu + QR Çağrı Kodu %1$s ile sohbet etmek için bunu tarayın Internet bağlantısı yok; QR kodu ayarlaması gerçekleştirilemiyor. @@ -886,7 +887,7 @@ \"%1$s\" adresine giriş yapılsın mı?\n\nVarolan hesabınız silinmeyecek. Hesaplarınız arasında geçiş yapmak için \"Hesabı Değiştir\" öğesini kullanın. - %1$s sizi bu gruba katılmaya davet etti.\n\n%2$s kişisinin aygıtının yanıt vermesi bekleniyor… + %1$s sizi bu gruba katılmaya çağırdı.\n\n%2$s kişisinin aygıtının yanıt vermesi bekleniyor… %1$s yanıtladı; gruba eklenmesi bekleniyor… %1$s doğrulandı. diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 25bd54dfd..2b45a965c 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -443,8 +443,9 @@ Старт... Будь ласка, спочатку прийміть запит на чат. - + Надіслати \"%1$s\" до… + Надіслати повідомлення до... diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 88b1a2d3d..9716b877c 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -398,8 +398,9 @@ 开始… 请先接受聊天请求 - + 发送“%1$s\"到... + 发送消息到... From 93acb0e4bc2643782b4f68136ecc782e094f8bd4 Mon Sep 17 00:00:00 2001 From: bjoern Date: Thu, 31 Aug 2023 16:57:48 +0200 Subject: [PATCH 021/169] add 'Close Window' string needed for desktop (#2644) --- res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index 9955500c9..55311abf2 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -31,6 +31,7 @@ Back Verified Close + Close Window Forward Resend From 2ec89d617cdabe0bd8353e6cb5779f74748e8e7b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 31 Aug 2023 17:01:08 +0200 Subject: [PATCH 022/169] update translations --- res/values-de/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index e8589ec16..55536bc97 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -31,6 +31,7 @@ Zurück Verifiziert Schließen + Fenster schließen Weiterleiten Erneut senden From 85f1965a1dd6eedf9f98e82595113f49bb018909 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 4 Sep 2023 23:31:23 +0000 Subject: [PATCH 023/169] fix: add missing `bqi` entry to language_values array --- res/values/arrays.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 9661cf35a..89d937801 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -70,6 +70,7 @@ hr it lt + bqi hu nl nb From 9e050bbf0ee9de3dbd280fb7105c13c58842a447 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 5 Sep 2023 02:13:45 +0000 Subject: [PATCH 024/169] build: enable -Werror flag when building the core If this flag was enabled, CI would have caught incorrect core in 1.40.0 release tag that caused crashing at start F-Droid 1.40.0 release. --- jni/Android.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jni/Android.mk b/jni/Android.mk index 8597475da..e2867679c 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -23,7 +23,10 @@ LOCAL_C_INCLUDES := $(JNI_DIR)/utils/ LOCAL_LDLIBS := -llog LOCAL_STATIC_LIBRARIES := deltachat-core -LOCAL_CFLAGS := -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 +# -Werror flag is important to catch incompatibilities between the JNI bindings and the core. +# Otherwise passing a variable of different type such as char * instead of int +# causes only a -Wint-conversion warning. +LOCAL_CFLAGS := -Werror -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS From 1e69fa8d04118b71357e4964ff6925ac906fbdb3 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 24 Sep 2023 11:44:33 +0200 Subject: [PATCH 025/169] update translations --- res/values-fr/strings.xml | 8 +++++- res/values-in/strings.xml | 47 +++++++++++++++++++++++++++++++++++ res/values-it/strings.xml | 1 + res/values-nl/strings.xml | 1 + res/values-pl/strings.xml | 1 + res/values-ru/strings.xml | 7 ++++++ res/values-sq/strings.xml | 1 + res/values-tr/strings.xml | 5 ++-- res/values-zh-rCN/strings.xml | 1 + 9 files changed, 69 insertions(+), 3 deletions(-) diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index af7e2137c..2d1399420 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -31,6 +31,7 @@ Retour Vérifié Fermer + Fermer la fenêtre Faire suivre Renvoyer @@ -428,8 +429,13 @@ Démarrer... Veuillez d\'abord accepter l\'invitation. + + Envoyer \"%1$s\" à + + Envoyer un message à + - Afficher les positions dans le temps + Afficher les positions pour une période Afficher les traces Afficher les points d\'intérêt diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 9a4f8fa20..03c0815d5 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -31,6 +31,7 @@ Kembali Diverifikasi Tutup + Tutup Jendela Teruskan Kirim ulang @@ -60,6 +61,7 @@ Memuat Gambar Jarak Jauh Selalu Sekali + Tampilkan Peringatan Tunjukkan kata kunci Sembunyikan kata kunci Tidak sekarang @@ -90,6 +92,11 @@ Bulan ini Minggu lalu Bulan lalu + + Terakhir terlihat di %1$s + + Terakhir terlihat %1$s + Terakhir terlihat: Tidak diketahui %d menit @@ -110,12 +117,22 @@ %d anggota + + %d penerima + + + + %d Dipilih + + Saya Draf Gambar Balas Gif + + Stiker Gambar Audio Pesan suara @@ -128,12 +145,21 @@ Kontak Kontak terverifikasi Kamera + + Tangkap Ganti kamera + Beralih ke Mode Layar Penuh Lokasi + Lokasi Galeri Gambar dan video Berkas File + + Aplikasi + + Aplikasi + Berkas dan Aplikasi Tak dikenal Hijau @@ -159,7 +185,10 @@ Kontak baru Obrolan baru Grup baru + + Kelompok atau Subjek Baru Grup baru terverifikasi + Tambahkan Penerima Terkirim Tekan tombol emoji keyboard Edit grup @@ -170,6 +199,8 @@ Tambah lampiran Tinggalkan grup Hapus obrolan + + Hapus Obrolan Apakah anda yakin ingin menghapus \"%1$s\"? Hapus pesan Hapus kontak @@ -186,12 +217,16 @@ Nonaktifkan notifikasi Aktifkan notifikasi Ekspor lampiran + Ekspor lampiran Semua media Tunjukkan dalam chat Bagikan + + Blokir Blokir kontak Buka blokir kontak + Terima Mainkan Jeda Gelincir ke bawah @@ -199,6 +234,7 @@ Bantuan Kebijakan Privasi Pilih semua + Pilih Obrolan Pilih lebih banyak Edit nama Setelan @@ -207,6 +243,10 @@ Zoom perbesar Zoom perkecil Simpan log + Opsi Lainnya + Belajar Ejaan + Log Audit Obrolan + Lompat ke Pesan Salin JSON Bagikan lokasi kepada seluruh anggota grup Pesan perangkat @@ -247,7 +287,11 @@ Anda diundang ke obrolan video. Ketuk untuk bergabung Ketuk untuk membuka + Contoh: https://your-server.org/$ROOM + Gunakan \"%1$s\" untuk mengundang orang lain ke obrolan video? Setelah diatur, Anda dapat memulai obrolan video dari setiap obrolan. Ini menggantikan pengaturan sebelumnya untuk obrolan video. Undangan obrolan video + Anda diundang ke obrolan video, klik %1$s untuk bergabung. + Apakah anda yakin untuk keluar dari grup ini? @@ -256,6 +300,9 @@ Hapus %d pesan disini dan di server? + + Menghapus pesan %d? + Teruskan pesan ke %1$s? Ekspor lampiran? Mengekspor lampiran akan membuat aplikasi lain di perangkat anda terakses.\n\nLanjut? Blokir kontak ini? Anda tak akan lagi menerima pesan dari kontak ini. diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 8d42169f9..fe0933e27 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -31,6 +31,7 @@ Indietro Verificato Chiudi + Chiudi finestra Inoltra Reinvia diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 10bd260e1..3bc4ead43 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -31,6 +31,7 @@ Terug Goedgekeurd Sluiten + Venster sluiten Doorsturen Opnieuw versturen diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index ed52f54c0..230107eb6 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -31,6 +31,7 @@ Wróć Zweryfikowano Zamknij + Zamknij okno Przekaż Wyślij ponownie diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 453c1610e..61c326d82 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -31,6 +31,7 @@ Назад Верифицирован Закрыть + Закрыть окно Переслать Переотправить @@ -265,6 +266,7 @@ Помощь Политика конфиденциальности Выбрать всё + Выбрать чат Выбрать больше Изменить имя Настройки @@ -442,6 +444,11 @@ Запустить... Пожалуйста, сначала примите запрос + + Отправить \"%1$s\" … + + Отправить сообщение... + Показать местоположения с интервалом времени Показывать маршруты diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index 768c1a20d..a8cdf88e1 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -31,6 +31,7 @@ Mbrapsht Verifikuar Mbylle + Mbylle Dritaren Përpara Ridërgoje diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 3dc69f73f..c9f50e31a 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -31,6 +31,7 @@ Geri Doğrulandı Kapat + Pencereyi Kapat İlet Yeniden Gönder @@ -311,7 +312,7 @@ Açmak için Dokunun Video Sohbeti Örneği Video Sohbeti Örneğiniz - Örnekler: https://meet.jit.si/$ROOM ya da basicwebrtc:https://your-server + Örnek: https://your-server.org/$ROOM Etkinleştirilirse, her sohbetten video sohbeti başlatabilirsiniz. Her iki uçta da uyumlu bir uygulama ya da bir tarayıcı gerektirir. \"%1$s\" diğerlerini video sohbetlerine çağırmak için kullanılsın mı?\n\nBir kez ayarlandığında, her sohbetten video sohbeti başlatabilirsiniz. Bu, video sohbetleri için herhangi bir önceki ayarın yerini alır. Video sohbeti çağrısı @@ -615,7 +616,7 @@ Titret Ekran Güvenliği - Yeni listesinde ve uygulamanın içinde ekran görüntülerinin engellenmesini iste + En yeniler listesinde ve uygulamanın içinde ekran görüntülerinin engellenmesini iste Ekran güvenliği ayarını uygulamak için lütfen uygulamayı yeniden başlatın. Bildirimler Göster diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 9716b877c..6f0d427bd 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -31,6 +31,7 @@ 返回 已验证 关闭 + 关闭窗口 转发 重新发送 From 74c6899dff5d2ebcfd96fc88ede7621d626bb200 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 18 Sep 2023 22:38:34 +0200 Subject: [PATCH 026/169] don't show connectivity activity on title click when forwarding/sharing --- .../thoughtcrime/securesms/ConversationListActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index 28e55947f..a90c0c26f 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -308,7 +308,11 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit } private void initializeTitleListener() { - title.setOnClickListener(v -> startActivity(new Intent(this, ConnectivityActivity.class))); + title.setOnClickListener(v -> { + if (!isRelayingMessageContent(this)) { + startActivity(new Intent(this, ConnectivityActivity.class)); + } + }); } @Override From ae48c40f8da87d31538d2a798abc8da20083912d Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sun, 24 Sep 2023 22:17:36 +0200 Subject: [PATCH 027/169] improve landscape mode for webxdc --- .../securesms/WebxdcActivity.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index 22ea131a9..5656d158a 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms; import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; @@ -14,6 +15,7 @@ import android.util.Base64; import android.util.Log; import android.view.Menu; import android.view.MenuItem; +import android.view.View; import android.webkit.JavascriptInterface; import android.webkit.MimeTypeMap; import android.webkit.ValueCallback; @@ -197,6 +199,26 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE return false; } + @Override + public void onConfigurationChanged(Configuration newConfig) { + Log.i(TAG, "onConfigurationChanged(" + newConfig.orientation + ")"); + super.onConfigurationChanged(newConfig); + if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { + setFullscreen(true); + } else { + setFullscreen(false); + } + } + + private void setFullscreen(boolean enable) { + getWindow().getDecorView().setSystemUiVisibility(enable? View.SYSTEM_UI_FLAG_FULLSCREEN : 0); + if (enable) { + getSupportActionBar().hide(); + } else { + getSupportActionBar().show(); + } + } + @Override protected boolean openOnlineUrl(String url) { if (url.startsWith("mailto:")) { From 287e1d25b0f6ba3750f427ffc1c4e9acfe132fe4 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 25 Sep 2023 01:20:20 +0200 Subject: [PATCH 028/169] fix bug if already in landscape mode, and improve tablet support --- res/values-land/attrs.xml | 5 +++++ res/values-sw600dp/attrs.xml | 5 +++++ res/values/attrs.xml | 2 ++ .../thoughtcrime/securesms/WebxdcActivity.java | 16 ++++++++++------ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 res/values-land/attrs.xml create mode 100644 res/values-sw600dp/attrs.xml diff --git a/res/values-land/attrs.xml b/res/values-land/attrs.xml new file mode 100644 index 000000000..358acf850 --- /dev/null +++ b/res/values-land/attrs.xml @@ -0,0 +1,5 @@ + + + + true + diff --git a/res/values-sw600dp/attrs.xml b/res/values-sw600dp/attrs.xml new file mode 100644 index 000000000..57cda87ce --- /dev/null +++ b/res/values-sw600dp/attrs.xml @@ -0,0 +1,5 @@ + + + + false + diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 56cd66a8f..c2ab65b84 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -258,4 +258,6 @@ + + false diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index 5656d158a..585445d5f 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -101,6 +101,10 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE protected void onCreate(Bundle state, boolean ready) { super.onCreate(state, ready); + // enter fullscreen mode if necessary, + // this is needed here because if the app is opened while already in landscape mode, onConfigurationChanged() is not triggered + setScreenMode(); + webView.setWebChromeClient(new WebChromeClient() { @Override @RequiresApi(21) @@ -203,14 +207,14 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE public void onConfigurationChanged(Configuration newConfig) { Log.i(TAG, "onConfigurationChanged(" + newConfig.orientation + ")"); super.onConfigurationChanged(newConfig); - if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { - setFullscreen(true); - } else { - setFullscreen(false); - } + // orientation might have changed, enter/exit fullscreen mode if needed + setScreenMode(); } - private void setFullscreen(boolean enable) { + private void setScreenMode() { + // enter/exit fullscreen mode depending on orientation (landscape/portrait), + // on tablets there is enought height so fullscreen mode is never enabled there + boolean enable = getResources().getBoolean(R.bool.webxdcFullscreen); getWindow().getDecorView().setSystemUiVisibility(enable? View.SYSTEM_UI_FLAG_FULLSCREEN : 0); if (enable) { getSupportActionBar().hide(); From 9ff369374661b95d4d41985bbd21e657ad6f6c38 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 25 Sep 2023 13:08:13 +0200 Subject: [PATCH 029/169] set rounded corner for webxdc icons --- res/layout/webxdc_compact_view.xml | 6 ++++-- res/layout/webxdc_view.xml | 6 ++++-- res/values/styles.xml | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/res/layout/webxdc_compact_view.xml b/res/layout/webxdc_compact_view.xml index a1357eae4..5aa6a6622 100644 --- a/res/layout/webxdc_compact_view.xml +++ b/res/layout/webxdc_compact_view.xml @@ -1,6 +1,7 @@ - + android:scaleType="centerCrop" + app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize10Percent" /> - + android:scaleType="centerCrop" + app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize10Percent" /> #ff2090ea + From b4fe0b30e73e3777352edb514e57ff734db61a7c Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 25 Sep 2023 13:17:55 +0200 Subject: [PATCH 030/169] use isBigScreen and isLandscape attrs --- res/values-land/attrs.xml | 3 +-- res/values-sw600dp/attrs.xml | 3 +-- res/values/attrs.xml | 5 +++-- src/org/thoughtcrime/securesms/WebxdcActivity.java | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/res/values-land/attrs.xml b/res/values-land/attrs.xml index 358acf850..833469019 100644 --- a/res/values-land/attrs.xml +++ b/res/values-land/attrs.xml @@ -1,5 +1,4 @@ - - true + true diff --git a/res/values-sw600dp/attrs.xml b/res/values-sw600dp/attrs.xml index 57cda87ce..2a56cbc7e 100644 --- a/res/values-sw600dp/attrs.xml +++ b/res/values-sw600dp/attrs.xml @@ -1,5 +1,4 @@ - - false + true diff --git a/res/values/attrs.xml b/res/values/attrs.xml index c2ab65b84..93e3cc8bd 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -258,6 +258,7 @@ - - false + false + + false diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index 585445d5f..ec52d14fc 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -214,7 +214,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE private void setScreenMode() { // enter/exit fullscreen mode depending on orientation (landscape/portrait), // on tablets there is enought height so fullscreen mode is never enabled there - boolean enable = getResources().getBoolean(R.bool.webxdcFullscreen); + boolean enable = getResources().getBoolean(R.bool.isLandscape) && !getResources().getBoolean(R.bool.isBigScreen); getWindow().getDecorView().setSystemUiVisibility(enable? View.SYSTEM_UI_FLAG_FULLSCREEN : 0); if (enable) { getSupportActionBar().hide(); From 32a70bd8da2c5878d6dfd5258b82951a92be8d7a Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 25 Sep 2023 14:39:44 +0200 Subject: [PATCH 031/169] apply suggestions --- res/layout/webxdc_view.xml | 1 + res/values/styles.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/res/layout/webxdc_view.xml b/res/layout/webxdc_view.xml index 8e6f04a4f..45baac6d6 100644 --- a/res/layout/webxdc_view.xml +++ b/res/layout/webxdc_view.xml @@ -12,6 +12,7 @@ android:gravity="center_vertical" android:orientation="vertical"> + From f4abd655c661f6e35ae518975bf0cb9abb8d1f1b Mon Sep 17 00:00:00 2001 From: adbenitez Date: Mon, 25 Sep 2023 15:26:10 +0200 Subject: [PATCH 032/169] fix title refreshing on webxdc document name changes --- src/org/thoughtcrime/securesms/WebxdcActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index ec52d14fc..cc7ad4a47 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -124,6 +124,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE DcEventCenter eventCenter = DcHelper.getEventCenter(WebxdcActivity.this.getApplicationContext()); eventCenter.addObserver(DcContext.DC_EVENT_WEBXDC_STATUS_UPDATE, this); + eventCenter.addObserver(DcContext.DC_EVENT_MSGS_CHANGED, this); Bundle b = getIntent().getExtras(); int appMessageId = b.getInt("appMessageId"); @@ -303,6 +304,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE Log.i(TAG, "handleEvent"); webView.loadUrl("javascript:document.getElementById('frame').contentWindow.__webxdcUpdate();"); } else if ((eventId == DcContext.DC_EVENT_MSGS_CHANGED && event.getData2Int() == dcAppMsg.getId())) { + this.dcAppMsg = this.dcContext.getMsg(event.getData2Int()); // msg changed, reload data from db Util.runOnAnyBackgroundThread(() -> { final JSONObject info = dcAppMsg.getWebxdcInfo(); final DcChat chat = dcContext.getChat(dcAppMsg.getChatId()); From 0f09aba7af9832ec789c6afabf8a548df0708778 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 25 Sep 2023 21:11:04 +0200 Subject: [PATCH 033/169] remove unused DcHttpResponse and related functions they are replaced by jsonrpc in https://github.com/deltachat/deltachat-android/pull/2479 --- jni/dc_wrapper.c | 69 ---------------------- src/com/b44t/messenger/DcContext.java | 2 - src/com/b44t/messenger/DcHttpResponse.java | 22 ------- 3 files changed, 93 deletions(-) delete mode 100644 src/com/b44t/messenger/DcHttpResponse.java diff --git a/jni/dc_wrapper.c b/jni/dc_wrapper.c index 9d25ef687..ae91ff70a 100644 --- a/jni/dc_wrapper.c +++ b/jni/dc_wrapper.c @@ -1026,15 +1026,6 @@ JNIEXPORT jlong Java_com_b44t_messenger_DcContext_getProviderFromEmailWithDnsCPt } -JNIEXPORT jlong Java_com_b44t_messenger_DcContext_getHttpResponseCPtr(JNIEnv *env, jobject obj, jstring url) -{ - CHAR_REF(url); - jlong ret = (jlong)dc_get_http_response(get_dc_context(env, obj), urlPtr); - CHAR_UNREF(url); - return ret; -} - - /******************************************************************************* * DcEventEmitter ******************************************************************************/ @@ -2083,66 +2074,6 @@ JNIEXPORT jstring Java_com_b44t_messenger_DcProvider_getOverviewPage(JNIEnv *env } -/******************************************************************************* - * DcHttpResponse - ******************************************************************************/ - - -static dc_http_response_t* get_dc_http_response(JNIEnv *env, jobject obj) -{ - static jfieldID fid = 0; - if (fid==0) { - jclass cls = (*env)->GetObjectClass(env, obj); - fid = (*env)->GetFieldID(env, cls, "httpResponseCPtr", "J" /*Signature, J=long*/); - } - if (fid) { - return (dc_http_response_t*)(*env)->GetLongField(env, obj, fid); - } - return NULL; -} - - -JNIEXPORT void Java_com_b44t_messenger_DcHttpResponse_unrefHttpResponseCPtr(JNIEnv *env, jobject obj) -{ - dc_http_response_unref(get_dc_http_response(env, obj)); -} - - -JNIEXPORT jstring Java_com_b44t_messenger_DcHttpResponse_getMimetype(JNIEnv *env, jobject obj) -{ - char* temp = dc_http_response_get_mimetype(get_dc_http_response(env, obj)); - jstring ret = NULL; - if (temp) { - ret = JSTRING_NEW(temp); - } - dc_str_unref(temp); - return ret; -} - - -JNIEXPORT jstring Java_com_b44t_messenger_DcHttpResponse_getEncoding(JNIEnv *env, jobject obj) -{ - char* temp = dc_http_response_get_encoding(get_dc_http_response(env, obj)); - jstring ret = NULL; - if (temp) { - ret = JSTRING_NEW(temp); - } - dc_str_unref(temp); - return ret; -} - - -JNIEXPORT jbyteArray Java_com_b44t_messenger_DcHttpResponse_getBlob(JNIEnv *env, jobject obj) -{ - jbyteArray ret = NULL; - dc_http_response_t* http_response = get_dc_http_response(env, obj); - size_t ptr_size = dc_http_response_get_size(http_response); - uint8_t* ptr = dc_http_response_get_blob(http_response); - ret = ptr2jbyteArray(env, ptr, ptr_size); - dc_str_unref((char*)ptr); - return ret; -} - /******************************************************************************* * DcJsonrpcInstance ******************************************************************************/ diff --git a/src/com/b44t/messenger/DcContext.java b/src/com/b44t/messenger/DcContext.java index e0314d584..caa7ca647 100644 --- a/src/com/b44t/messenger/DcContext.java +++ b/src/com/b44t/messenger/DcContext.java @@ -216,7 +216,6 @@ public class DcContext { public DcArray getLocations (int chat_id, int contact_id, long timestamp_start, long timestamp_end) { return new DcArray(getLocationsCPtr(chat_id, contact_id, timestamp_start, timestamp_end)); } public native void deleteAllLocations (); public DcProvider getProviderFromEmailWithDns (String email) { long cptr = getProviderFromEmailWithDnsCPtr(email); return cptr!=0 ? new DcProvider(cptr) : null; } - public DcHttpResponse getHttpResponse (String url) { long cptr = getHttpResponseCPtr(url); return cptr!=0 ? new DcHttpResponse(cptr) : null; } public String getNameNAddr() { String displayname = getConfig("displayname"); @@ -256,5 +255,4 @@ public class DcContext { private native long checkQrCPtr (String qr); private native long getProviderFromEmailWithDnsCPtr (String addr); private native long newBackupProviderCPtr(); - private native long getHttpResponseCPtr(String url); } diff --git a/src/com/b44t/messenger/DcHttpResponse.java b/src/com/b44t/messenger/DcHttpResponse.java deleted file mode 100644 index f41f9cd1c..000000000 --- a/src/com/b44t/messenger/DcHttpResponse.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.b44t.messenger; - -public class DcHttpResponse { - - public DcHttpResponse(long httpResponseCPtr) { - this.httpResponseCPtr = httpResponseCPtr; - } - - @Override protected void finalize() throws Throwable { - super.finalize(); - unrefHttpResponseCPtr(); - httpResponseCPtr = 0; - } - - public native String getMimetype (); - public native String getEncoding (); - public native byte[] getBlob (); - - // working with raw c-data - private long httpResponseCPtr; // CAVE: the name is referenced in the JNI - private native void unrefHttpResponseCPtr(); -} From 160303521de97edeee60f6f1dde3e8e082636260 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 26 Sep 2023 00:30:19 +0200 Subject: [PATCH 034/169] add more context to dialog title shown after sendToChat() --- .../securesms/ConversationListActivity.java | 12 +++++++++++- src/org/thoughtcrime/securesms/ShareActivity.java | 8 ++++++++ src/org/thoughtcrime/securesms/WebxdcActivity.java | 2 +- .../thoughtcrime/securesms/connect/DcHelper.java | 6 +++++- src/org/thoughtcrime/securesms/util/RelayUtil.java | 13 +++++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index a90c0c26f..a4aaaaa04 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -21,6 +21,7 @@ import static org.thoughtcrime.securesms.ConversationActivity.STARTING_POSITION_ import static org.thoughtcrime.securesms.map.MapDataManager.ALL_CHATS_GLOBAL_MAP; import static org.thoughtcrime.securesms.util.RelayUtil.acquireRelayMessageContent; import static org.thoughtcrime.securesms.util.RelayUtil.getDirectSharingChatId; +import static org.thoughtcrime.securesms.util.RelayUtil.getSharedTitle; import static org.thoughtcrime.securesms.util.RelayUtil.isDirectSharing; import static org.thoughtcrime.securesms.util.RelayUtil.isForwarding; import static org.thoughtcrime.securesms.util.RelayUtil.isRelayingMessageContent; @@ -215,7 +216,16 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit public void refreshTitle() { if (isRelayingMessageContent(this)) { - title.setText(isForwarding(this) ? R.string.forward_to : R.string.chat_share_with_title); + if (isForwarding(this)) { + title.setText(R.string.forward_to); + } else { + String titleStr = getSharedTitle(this); + if (titleStr != null) { // sharing from sendToChat + title.setText(titleStr); + } else { // normal sharing + title.setText(R.string.chat_share_with_title); + } + } getSupportActionBar().setDisplayHomeAsUpEnabled(true); } else { title.setText(DcHelper.getConnectivitySummary(this, R.string.app_name)); diff --git a/src/org/thoughtcrime/securesms/ShareActivity.java b/src/org/thoughtcrime/securesms/ShareActivity.java index 3df404a73..dc70e051f 100644 --- a/src/org/thoughtcrime/securesms/ShareActivity.java +++ b/src/org/thoughtcrime/securesms/ShareActivity.java @@ -18,6 +18,7 @@ package org.thoughtcrime.securesms; import static org.thoughtcrime.securesms.util.RelayUtil.setSharedText; +import static org.thoughtcrime.securesms.util.RelayUtil.setSharedTitle; import android.Manifest; import android.content.Intent; @@ -57,6 +58,7 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity implement private static final String TAG = ShareActivity.class.getSimpleName(); public static final String EXTRA_CHAT_ID = "chat_id"; + public static final String EXTRA_TITLE = "extra_title"; private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme(); private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); @@ -274,6 +276,12 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity implement private Intent getBaseShareIntent(final @NonNull Class target) { final Intent intent = new Intent(this, target); + + String title = getIntent().getStringExtra(EXTRA_TITLE); + if (title != null) { + setSharedTitle(intent, title); + } + String text = getIntent().getStringExtra(Intent.EXTRA_TEXT); if (text==null) { CharSequence cs = getIntent().getCharSequenceExtra(Intent.EXTRA_TEXT); diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index ec52d14fc..eb84d177c 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -436,7 +436,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE return "provided file is invalid, you need to set both name and base64 content"; } - DcHelper.share(WebxdcActivity.this, data, "application/octet-stream", name, text); + DcHelper.sendToChat(WebxdcActivity.this, data, "application/octet-stream", name, text); return null; } catch (Exception e) { e.printStackTrace(); diff --git a/src/org/thoughtcrime/securesms/connect/DcHelper.java b/src/org/thoughtcrime/securesms/connect/DcHelper.java index 9f899b340..397ae6e06 100644 --- a/src/org/thoughtcrime/securesms/connect/DcHelper.java +++ b/src/org/thoughtcrime/securesms/connect/DcHelper.java @@ -313,7 +313,7 @@ public class DcHelper { } } - public static void share(Context activity, byte[] data, String mimeType, String fileName, String text) { + public static void sendToChat(Context activity, byte[] data, String mimeType, String fileName, String text) { Intent intent = new Intent(activity, ShareActivity.class); intent.setAction(Intent.ACTION_SEND); @@ -321,10 +321,14 @@ public class DcHelper { Uri uri = PersistentBlobProvider.getInstance().create(activity, data, mimeType, fileName); intent.setType(mimeType); intent.putExtra(Intent.EXTRA_STREAM, uri); + intent.putExtra(ShareActivity.EXTRA_TITLE, activity.getString(R.string.send_file_to, fileName)); } if (text != null) { intent.putExtra(Intent.EXTRA_TEXT, text); + if (data == null) { + intent.putExtra(ShareActivity.EXTRA_TITLE, activity.getString(R.string.send_message_to)); + } } activity.startActivity(intent); diff --git a/src/org/thoughtcrime/securesms/util/RelayUtil.java b/src/org/thoughtcrime/securesms/util/RelayUtil.java index 04903c7c0..818f179cf 100644 --- a/src/org/thoughtcrime/securesms/util/RelayUtil.java +++ b/src/org/thoughtcrime/securesms/util/RelayUtil.java @@ -14,6 +14,7 @@ public class RelayUtil { private static final String FORWARDED_MESSAGE_IDS = "forwarded_message_ids"; private static final String SHARED_URIS = "shared_uris"; private static final String IS_SHARING = "is_sharing"; + private static final String SHARING_TITLE = "sharing_title"; private static final String DIRECT_SHARING_CHAT_ID = "direct_sharing_chat_id"; public static boolean isRelayingMessageContent(Activity activity) { @@ -79,6 +80,14 @@ public class RelayUtil { } } + public static String getSharedTitle(Activity activity) { + try { + return activity.getIntent().getStringExtra(SHARING_TITLE); + } catch (NullPointerException npe) { + return null; + } + } + public static void resetRelayingMessageContent(Activity activity) { try { @@ -123,6 +132,10 @@ public class RelayUtil { composeIntent.putExtra(IS_SHARING, true); } + public static void setSharedTitle(Intent composeIntent, String text) { + composeIntent.putExtra(SHARING_TITLE, text); + } + public static void setDirectSharing(Intent composeIntent, int chatId) { composeIntent.putExtra(DIRECT_SHARING_CHAT_ID, chatId); } From b8aacfe164b403833aef266afac4170c311446f1 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 26 Sep 2023 00:46:23 +0200 Subject: [PATCH 035/169] only jump to message if info message is from webxdc --- src/org/thoughtcrime/securesms/ConversationFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ConversationFragment.java b/src/org/thoughtcrime/securesms/ConversationFragment.java index b0460d088..f18c42c1f 100644 --- a/src/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationFragment.java @@ -802,7 +802,7 @@ public class ConversationFragment extends MessageSelectorFragment else if(DozeReminder.isDozeReminderMsg(getContext(), messageRecord)) { DozeReminder.dozeReminderTapped(getContext()); } - else if(messageRecord.isInfo() && messageRecord.getParent() != null && messageRecord.getParent().getType() == DcMsg.DC_MSG_WEBXDC) { + else if(messageRecord.getInfoType() == DcMsg.DC_INFO_WEBXDC_INFO_MESSAGE) { scrollMaybeSmoothToMsgId(messageRecord.getParent().getId()); } else { From ed9d0a94626aa3a43aa36d1bb4498bd0eaa59f5c Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 25 Sep 2023 23:33:06 +0200 Subject: [PATCH 036/169] add getVerifierAddr/Id api --- jni/dc_wrapper.c | 15 +++++++++++++++ src/com/b44t/messenger/DcContact.java | 2 ++ 2 files changed, 17 insertions(+) diff --git a/jni/dc_wrapper.c b/jni/dc_wrapper.c index ae91ff70a..8a414ae62 100644 --- a/jni/dc_wrapper.c +++ b/jni/dc_wrapper.c @@ -1909,6 +1909,21 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcContact_isVerified(JNIEnv *env, job } +JNIEXPORT jstring Java_com_b44t_messenger_DcContact_getVerifierAddr(JNIEnv *env, jobject obj) +{ + char* temp = dc_contact_get_verifier_addr(get_dc_contact(env, obj)); + jstring ret = JSTRING_NEW(temp); + dc_str_unref(temp); + return ret; +} + + +JNIEXPORT jint Java_com_b44t_messenger_DcContact_getVerifierId(JNIEnv *env, jobject obj) +{ + return dc_contact_get_verifier_id(get_dc_contact(env, obj)); +} + + /******************************************************************************* * DcLot ******************************************************************************/ diff --git a/src/com/b44t/messenger/DcContact.java b/src/com/b44t/messenger/DcContact.java index 3fc164b3f..2460468ca 100644 --- a/src/com/b44t/messenger/DcContact.java +++ b/src/com/b44t/messenger/DcContact.java @@ -58,6 +58,8 @@ public class DcContact { public native boolean wasSeenRecently(); public native boolean isBlocked (); public native boolean isVerified (); + public native String getVerifierAddr(); + public native int getVerifierId (); // working with raw c-data private long contactCPtr; // CAVE: the name is referenced in the JNI From ea93a05d2d611a42067825a7d7412369a546b8e1 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 25 Sep 2023 23:33:22 +0200 Subject: [PATCH 037/169] add basic verified-by line --- .../thoughtcrime/securesms/ProfileSettingsAdapter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index 68766932a..f8d5a787c 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -32,6 +32,7 @@ import java.util.Set; public class ProfileSettingsAdapter extends RecyclerView.Adapter implements StickyHeaderAdapter { + public static final int SETTING_VERIFIED = 119; public static final int SETTING_SEND_MESSAGE = 120; private final @NonNull Context context; @@ -312,6 +313,13 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter itemDataContact = dcContact; if (!chatIsDeviceTalk) { + if (dcContact.isVerified()) { + String verifiedInfo = context.getString(R.string.verified); + if (!dcContact.getVerifierAddr().isEmpty()) { + verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr()); + } + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo)); + } itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message))); } From 3194e94f28c80f29f25a44437dba51604aa4d4dd Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 00:06:26 +0200 Subject: [PATCH 038/169] set icon beside 'verified by' --- res/layout/profile_settings_item.xml | 1 + .../securesms/ProfileSettingsAdapter.java | 18 ++++++++++-------- .../securesms/ProfileSettingsItem.java | 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/res/layout/profile_settings_item.xml b/res/layout/profile_settings_item.xml index 37b3c06b4..1a57eec3a 100644 --- a/res/layout/profile_settings_item.xml +++ b/res/layout/profile_settings_item.xml @@ -10,6 +10,7 @@ diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index f8d5a787c..7574447b4 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -62,21 +62,23 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter int chatlistIndex; int settingsId; String label; + int iconLeft; - ItemData(int type, int settingsId, String label) { - this(type, 0, 0, settingsId, label); + ItemData(int type, int settingsId, String label, int iconLeft) { + this(type, 0, 0, settingsId, label, iconLeft); } ItemData(int type, int contactId, int chatlistIndex) { - this(type, contactId, chatlistIndex, 0, null); + this(type, contactId, chatlistIndex, 0, null, 0); } - ItemData(int type, int contactId, int chatlistIndex, int settingsId, @Nullable String label) { + ItemData(int type, int contactId, int chatlistIndex, int settingsId, @Nullable String label, int iconLeft) { this.type = type; this.contactId = contactId; this.chatlistIndex = chatlistIndex; this.settingsId = settingsId; this.label = label; + this.iconLeft = iconLeft; } }; @@ -192,7 +194,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter int settingsId = itemData.get(i).settingsId; ProfileSettingsItem profileSettingsItem = (ProfileSettingsItem) holder.itemView; profileSettingsItem.setOnClickListener(view -> clickListener.onSettingsClicked(settingsId)); - profileSettingsItem.set(itemData.get(i).label); + profileSettingsItem.set(itemData.get(i).label, itemData.get(i).iconLeft); } } @@ -318,14 +320,14 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter if (!dcContact.getVerifierAddr().isEmpty()) { verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr()); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo)); + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo, R.drawable.ic_verified)); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message))); + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), 0)); } itemDataStatusText = dcContact.getStatus(); if (!itemDataStatusText.isEmpty()) { - itemData.add(new ItemData(ItemData.TYPE_STATUS, 0, itemDataStatusText)); + itemData.add(new ItemData(ItemData.TYPE_STATUS, 0, itemDataStatusText, 0)); } itemDataSharedChats = sharedChats; diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java index c14a029a0..c97800cd5 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java @@ -23,7 +23,8 @@ public class ProfileSettingsItem extends LinearLayout { labelView = findViewById(R.id.label); } - public void set(String label) { + public void set(String label, int iconLeft) { labelView.setText(label==null? "" : label); + labelView.setCompoundDrawablesWithIntrinsicBounds(iconLeft, 0,0,0); } } From 89ab39c6ae4a5598f6c491434182f1f5c0a63570 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 00:27:20 +0200 Subject: [PATCH 039/169] open verifier profile on tap --- .../securesms/ProfileSettingsFragment.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java index 2030e4a15..43eac0415 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java @@ -146,6 +146,9 @@ public class ProfileSettingsFragment extends Fragment case ProfileSettingsAdapter.SETTING_SEND_MESSAGE: onSendMessage(); break; + case ProfileSettingsAdapter.SETTING_VERIFIED: + onVerifiedByClicked(); + break; } } @@ -233,6 +236,18 @@ public class ProfileSettingsFragment extends Fragment getActivity().finish(); } + private void onVerifiedByClicked() { + DcContact dcContact = dcContext.getContact(contactId); + if (dcContact.isVerified()) { + int verifierId = dcContact.getVerifierId(); + if (verifierId != 0 && verifierId != contactId) { + Intent intent = new Intent(getContext(), ProfileActivity.class); + intent.putExtra(ProfileActivity.CONTACT_ID_EXTRA, verifierId); + startActivity(intent); + } + } + } + private void onSendMessage() { DcContact dcContact = dcContext.getContact(contactId); int chatId = dcContext.createChatByContactId(dcContact.getId()); From 4fd036f79877d1a5e35f1af6d9680bacea652704 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 00:46:32 +0200 Subject: [PATCH 040/169] make the button look more like a button --- .../securesms/ProfileSettingsAdapter.java | 18 ++++++++++-------- .../securesms/ProfileSettingsItem.java | 13 ++++++++++++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index 7574447b4..629a88ec1 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -62,22 +62,24 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter int chatlistIndex; int settingsId; String label; + int labelColor; int iconLeft; - ItemData(int type, int settingsId, String label, int iconLeft) { - this(type, 0, 0, settingsId, label, iconLeft); + ItemData(int type, int settingsId, String label, int labelColor, int iconLeft) { + this(type, 0, 0, settingsId, label, labelColor, iconLeft); } ItemData(int type, int contactId, int chatlistIndex) { - this(type, contactId, chatlistIndex, 0, null, 0); + this(type, contactId, chatlistIndex, 0, null, 0, 0); } - ItemData(int type, int contactId, int chatlistIndex, int settingsId, @Nullable String label, int iconLeft) { + ItemData(int type, int contactId, int chatlistIndex, int settingsId, @Nullable String label, int labelColor, int iconLeft) { this.type = type; this.contactId = contactId; this.chatlistIndex = chatlistIndex; this.settingsId = settingsId; this.label = label; + this.labelColor = labelColor; this.iconLeft = iconLeft; } }; @@ -194,7 +196,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter int settingsId = itemData.get(i).settingsId; ProfileSettingsItem profileSettingsItem = (ProfileSettingsItem) holder.itemView; profileSettingsItem.setOnClickListener(view -> clickListener.onSettingsClicked(settingsId)); - profileSettingsItem.set(itemData.get(i).label, itemData.get(i).iconLeft); + profileSettingsItem.set(itemData.get(i).label, itemData.get(i).labelColor, itemData.get(i).iconLeft); } } @@ -320,14 +322,14 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter if (!dcContact.getVerifierAddr().isEmpty()) { verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr()); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo, R.drawable.ic_verified)); + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), 0)); + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0)); } itemDataStatusText = dcContact.getStatus(); if (!itemDataStatusText.isEmpty()) { - itemData.add(new ItemData(ItemData.TYPE_STATUS, 0, itemDataStatusText, 0)); + itemData.add(new ItemData(ItemData.TYPE_STATUS, 0, itemDataStatusText, 0, 0)); } itemDataSharedChats = sharedChats; diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java index c97800cd5..8d285d173 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java @@ -5,6 +5,10 @@ import android.util.AttributeSet; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.core.content.ContextCompat; + +import org.thoughtcrime.securesms.util.ResUtil; + public class ProfileSettingsItem extends LinearLayout { private TextView labelView; @@ -23,8 +27,15 @@ public class ProfileSettingsItem extends LinearLayout { labelView = findViewById(R.id.label); } - public void set(String label, int iconLeft) { + public void set(String label, int labelColor, int iconLeft) { labelView.setText(label==null? "" : label); labelView.setCompoundDrawablesWithIntrinsicBounds(iconLeft, 0,0,0); + + // we need different color getters as `labelColor` is `R.color.name` while default is `R.attr.name` + if (labelColor != 0) { + labelView.setTextColor(ContextCompat.getColor(getContext(), labelColor)); + } else { + labelView.setTextColor(ResUtil.getColor(getContext(), R.attr.emoji_text_color)); // + } } } From 25d712816b0f95e50760aeb7e7d99fd1a50c6167 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 00:52:12 +0200 Subject: [PATCH 041/169] remove 'last seen' out of headline --- .../securesms/ProfileSettingsAdapter.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index 629a88ec1..669f087da 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -32,7 +32,8 @@ import java.util.Set; public class ProfileSettingsAdapter extends RecyclerView.Adapter implements StickyHeaderAdapter { - public static final int SETTING_VERIFIED = 119; + public static final int SETTING_VERIFIED = 118; + public static final int SETTING_LAST_SEEN = 119; public static final int SETTING_SEND_MESSAGE = 120; private final @NonNull Context context; @@ -240,13 +241,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter txt = context.getString(R.string.profile_shared_chats); break; case ItemData.TYPE_PRIMARY_SETTING: - long lastSeen = (itemDataContact!=null? itemDataContact.getLastSeen() : 0); - if (lastSeen == 0) { - txt = context.getString(R.string.last_seen_unknown); - } - else { - txt = context.getString(R.string.last_seen_at, DateUtils.getExtendedTimeSpanString(context, locale, lastSeen)); - } + txt = context.getString(R.string.info); break; case ItemData.TYPE_STATUS: txt = context.getString(R.string.pref_default_status_label); @@ -324,6 +319,18 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter } itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); } + + long lastSeenTimestamp = (itemDataContact!=null? itemDataContact.getLastSeen() : 0); + String lastSeenTxt; + if (lastSeenTimestamp == 0) { + lastSeenTxt = context.getString(R.string.last_seen_unknown); + } + else { + lastSeenTxt = context.getString(R.string.last_seen_at, DateUtils.getExtendedTimeSpanString(context, locale, lastSeenTimestamp)); + } + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_LAST_SEEN, lastSeenTxt, 0, 0)); + + itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0)); } From 92ddabc7eeb4c38ab61d10acc831d61a415b7a25 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 10:44:25 +0200 Subject: [PATCH 042/169] remove empty comment --- src/org/thoughtcrime/securesms/ProfileSettingsItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java index 8d285d173..8b113c29d 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsItem.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsItem.java @@ -35,7 +35,7 @@ public class ProfileSettingsItem extends LinearLayout { if (labelColor != 0) { labelView.setTextColor(ContextCompat.getColor(getContext(), labelColor)); } else { - labelView.setTextColor(ResUtil.getColor(getContext(), R.attr.emoji_text_color)); // + labelView.setTextColor(ResUtil.getColor(getContext(), R.attr.emoji_text_color)); } } } From 42143519d76ab1bf3b6e3de1586fe9d1ad6ade46 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 11:12:09 +0200 Subject: [PATCH 043/169] remove ts fragments from webxdc.js main reason is, that these annotations cover the code, making it hard to follow what is going on. maybe opionionated, however, in general, .ts is not needed in small projects, and an additional burden for devs. --- res/raw/webxdc.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/res/raw/webxdc.js b/res/raw/webxdc.js index 014ad4144..2b99c2760 100644 --- a/res/raw/webxdc.js +++ b/res/raw/webxdc.js @@ -45,15 +45,13 @@ window.webxdc = (() => { if (!message.file && !message.text) { return Promise.reject("sendToChat() error: file or text missing"); } - /** @type {(file: Blob) => Promise} */ + const blobToBase64 = (file) => { const dataStart = ";base64,"; return new Promise((resolve, reject) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = () => { - /** @type {string} */ - //@ts-ignore let data = reader.result; resolve(data.slice(data.indexOf(dataStart) + dataStart.length)); }; @@ -64,7 +62,6 @@ window.webxdc = (() => { data.text = message.text; } - /** @type {{file_name: string, file_message: string} | null} */ if (message.file) { let base64content; if (!message.file.name) { @@ -78,20 +75,12 @@ window.webxdc = (() => { return Promise.reject("sendToChat() error: only one of blob, base64 or plainText allowed"); } - // @ts-ignore - needed because typescript imagines that blob would not exist if (message.file.blob instanceof Blob) { - // @ts-ignore - needed because typescript imagines that blob would not exist base64content = await blobToBase64(message.file.blob); - // @ts-ignore - needed because typescript imagines that base64 would not exist } else if (typeof message.file.base64 === "string") { - // @ts-ignore - needed because typescript imagines that base64 would not exist base64content = message.file.base64; - // @ts-ignore - needed because typescript imagines that plainText would not exist } else if (typeof message.file.plainText === "string") { - base64content = await blobToBase64( - // @ts-ignore - needed because typescript imagines that plainText would not exist - new Blob([message.file.plainText]) - ); + base64content = await blobToBase64(new Blob([message.file.plainText])); } else { return Promise.reject("sendToChat() error: none of blob, base64 or plainText set correctly"); } From afd0cee3e66dff828c987aefeaba408298b9e03e Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 11:23:10 +0200 Subject: [PATCH 044/169] profiles: rename categories to what they are --- .../securesms/ProfileSettingsAdapter.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index 669f087da..785754120 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -54,10 +54,10 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter private final GlideRequests glideRequests; static class ItemData { - static final int TYPE_PRIMARY_SETTING = 1; - static final int TYPE_STATUS = 2; - static final int TYPE_MEMBER = 3; - static final int TYPE_SHARED_CHAT = 4; + static final int CATEGORY_INFO = 1; + static final int CATEGORY_SIGNATURE = 2; + static final int CATEGORY_MEMBERS = 3; + static final int CATEGORY_SHARED_CHATS = 4; int type; int contactId; int chatlistIndex; @@ -121,17 +121,17 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter @Override public ProfileSettingsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - if (viewType == ItemData.TYPE_MEMBER) { + if (viewType == ItemData.CATEGORY_MEMBERS) { final ContactSelectionListItem item = (ContactSelectionListItem)layoutInflater.inflate(R.layout.contact_selection_list_item, parent, false); item.setNoHeaderPadding(); return new ViewHolder(item); } - else if (viewType == ItemData.TYPE_SHARED_CHAT) { + else if (viewType == ItemData.CATEGORY_SHARED_CHATS) { final ConversationListItem item = (ConversationListItem)layoutInflater.inflate(R.layout.conversation_list_item_view, parent, false); item.hideItemDivider(); return new ViewHolder(item); } - else if (viewType == ItemData.TYPE_STATUS) { + else if (viewType == ItemData.CATEGORY_SIGNATURE) { final ProfileStatusItem item = (ProfileStatusItem)layoutInflater.inflate(R.layout.profile_status_item, parent, false); return new ViewHolder(item); } @@ -228,7 +228,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter public void onBindHeaderViewHolder(HeaderViewHolder viewHolder, int position) { String txt = ""; switch(getItemViewType(position)) { - case ItemData.TYPE_MEMBER: + case ItemData.CATEGORY_MEMBERS: if (isMailingList) { txt = context.getString(R.string.contacts_headline); } else if (isBroadcast) { @@ -237,13 +237,13 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter txt = context.getResources().getQuantityString(R.plurals.n_members, (int) itemDataMemberCount, (int) itemDataMemberCount); } break; - case ItemData.TYPE_SHARED_CHAT: + case ItemData.CATEGORY_SHARED_CHATS: txt = context.getString(R.string.profile_shared_chats); break; - case ItemData.TYPE_PRIMARY_SETTING: + case ItemData.CATEGORY_INFO: txt = context.getString(R.string.info); break; - case ItemData.TYPE_STATUS: + case ItemData.CATEGORY_SIGNATURE: txt = context.getString(R.string.pref_default_status_label); break; default: @@ -297,14 +297,14 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter if (dcChat.isMailingList()) { isMailingList = true; } else if (dcChat.canSend()) { - itemData.add(new ItemData(ItemData.TYPE_MEMBER, DcContact.DC_CONTACT_ID_ADD_MEMBER, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_MEMBERS, DcContact.DC_CONTACT_ID_ADD_MEMBER, 0)); if (!isBroadcast) { - itemData.add(new ItemData(ItemData.TYPE_MEMBER, DcContact.DC_CONTACT_ID_QR_INVITE, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_MEMBERS, DcContact.DC_CONTACT_ID_QR_INVITE, 0)); } } for (int value : memberList) { - itemData.add(new ItemData(ItemData.TYPE_MEMBER, value, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_MEMBERS, value, 0)); } } else if (sharedChats!=null && dcContact!=null) { @@ -317,7 +317,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter if (!dcContact.getVerifierAddr().isEmpty()) { verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr()); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); } long lastSeenTimestamp = (itemDataContact!=null? itemDataContact.getLastSeen() : 0); @@ -328,22 +328,22 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter else { lastSeenTxt = context.getString(R.string.last_seen_at, DateUtils.getExtendedTimeSpanString(context, locale, lastSeenTimestamp)); } - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_LAST_SEEN, lastSeenTxt, 0, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_LAST_SEEN, lastSeenTxt, 0, 0)); - itemData.add(new ItemData(ItemData.TYPE_PRIMARY_SETTING, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0)); } itemDataStatusText = dcContact.getStatus(); if (!itemDataStatusText.isEmpty()) { - itemData.add(new ItemData(ItemData.TYPE_STATUS, 0, itemDataStatusText, 0, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_SIGNATURE, 0, itemDataStatusText, 0, 0)); } itemDataSharedChats = sharedChats; if (!chatIsDeviceTalk) { int sharedChatsCnt = sharedChats.getCnt(); for (int i = 0; i < sharedChatsCnt; i++) { - itemData.add(new ItemData(ItemData.TYPE_SHARED_CHAT, 0, i)); + itemData.add(new ItemData(ItemData.CATEGORY_SHARED_CHATS, 0, i)); } } } From 3cf1168a067586c991a00a0636179c778e1a0518 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 26 Sep 2023 11:26:16 +0200 Subject: [PATCH 045/169] profiles: rename info-category items to what they are --- .../securesms/ProfileSettingsAdapter.java | 12 ++++++------ .../securesms/ProfileSettingsFragment.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java index 785754120..e159c244d 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsAdapter.java @@ -32,9 +32,9 @@ import java.util.Set; public class ProfileSettingsAdapter extends RecyclerView.Adapter implements StickyHeaderAdapter { - public static final int SETTING_VERIFIED = 118; - public static final int SETTING_LAST_SEEN = 119; - public static final int SETTING_SEND_MESSAGE = 120; + public static final int INFO_VERIFIED = 118; + public static final int INFO_LAST_SEEN = 119; + public static final int INFO_SEND_MESSAGE_BUTTON = 120; private final @NonNull Context context; private final @NonNull Locale locale; @@ -317,7 +317,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter if (!dcContact.getVerifierAddr().isEmpty()) { verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr()); } - itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified)); } long lastSeenTimestamp = (itemDataContact!=null? itemDataContact.getLastSeen() : 0); @@ -328,10 +328,10 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter else { lastSeenTxt = context.getString(R.string.last_seen_at, DateUtils.getExtendedTimeSpanString(context, locale, lastSeenTimestamp)); } - itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_LAST_SEEN, lastSeenTxt, 0, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_LAST_SEEN, lastSeenTxt, 0, 0)); - itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0)); + itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_SEND_MESSAGE_BUTTON, context.getString(R.string.send_message), R.color.delta_accent, 0)); } itemDataStatusText = dcContact.getStatus(); diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java index 43eac0415..a1a18bc2c 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java @@ -143,10 +143,10 @@ public class ProfileSettingsFragment extends Fragment @Override public void onSettingsClicked(int settingsId) { switch(settingsId) { - case ProfileSettingsAdapter.SETTING_SEND_MESSAGE: + case ProfileSettingsAdapter.INFO_SEND_MESSAGE_BUTTON: onSendMessage(); break; - case ProfileSettingsAdapter.SETTING_VERIFIED: + case ProfileSettingsAdapter.INFO_VERIFIED: onVerifiedByClicked(); break; } From da5309124e2cebfb3f526743c5abf605faf99e50 Mon Sep 17 00:00:00 2001 From: WofWca Date: Tue, 26 Sep 2023 12:47:22 +0400 Subject: [PATCH 046/169] style: add dark theme for webxdc wrapper It affects the "loading" stage Related: https://github.com/deltachat/deltachat-desktop/pull/3411 --- res/raw/webxdc_wrapper.html | 1 + 1 file changed, 1 insertion(+) diff --git a/res/raw/webxdc_wrapper.html b/res/raw/webxdc_wrapper.html index ab20e2fa1..c0ce221fa 100644 --- a/res/raw/webxdc_wrapper.html +++ b/res/raw/webxdc_wrapper.html @@ -1,6 +1,7 @@ + ", " html { color-scheme: dark light; }"); webView.loadDataWithBaseURL(null, connectivityHtml, "text/html", "utf-8", null); } diff --git a/src/org/thoughtcrime/securesms/WebViewActivity.java b/src/org/thoughtcrime/securesms/WebViewActivity.java index 0d4f8f890..676b83794 100644 --- a/src/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/org/thoughtcrime/securesms/WebViewActivity.java @@ -133,9 +133,10 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity } protected void setForceDark() { - if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { + if (Build.VERSION.SDK_INT <= 32 && WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { + // needed for older API (tested on android7) that do not set `color-scheme` without the following hint WebSettingsCompat.setForceDark(webView.getSettings(), - DynamicTheme.isDarkTheme(this) ? WebSettingsCompat.FORCE_DARK_ON : WebSettingsCompat.FORCE_DARK_OFF); + DynamicTheme.isDarkTheme(this) ? WebSettingsCompat.FORCE_DARK_ON : WebSettingsCompat.FORCE_DARK_OFF); } } From 0ef046a2bc6e16c5b8aba455eed4a9313f17314c Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sun, 1 Oct 2023 19:04:46 +0200 Subject: [PATCH 108/169] refresh chatlist data on new intent --- src/org/thoughtcrime/securesms/ConversationListFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index b745e0f59..a428a731d 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -203,6 +203,7 @@ public class ConversationListFragment extends Fragment } public void onNewIntent() { + loadChatlistAsync(); initializeFabClickListener(actionMode != null); } From 55fedbc751c28d521f692931a5c37c00f966b5e8 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sun, 1 Oct 2023 22:03:57 +0200 Subject: [PATCH 109/169] use correct account context for dcChat --- src/org/thoughtcrime/securesms/recipients/Recipient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/recipients/Recipient.java b/src/org/thoughtcrime/securesms/recipients/Recipient.java index 7dd0dade0..9225e79dd 100644 --- a/src/org/thoughtcrime/securesms/recipients/Recipient.java +++ b/src/org/thoughtcrime/securesms/recipients/Recipient.java @@ -121,7 +121,7 @@ public class Recipient { int chatId = dcChat.getId(); this.address = Address.fromChat(chatId); if (!dcChat.isMultiUser()) { - DcContext dcContext = DcHelper.getContext(context); + DcContext dcContext = DcHelper.getAccounts(context).getAccount(dcChat.getAccountId()); int[] contacts = dcContext.getChatContacts(chatId); if( contacts.length>=1 ) { this.dcContact = dcContext.getContact(contacts[0]); @@ -171,7 +171,7 @@ public class Recipient { public @NonNull List loadParticipants(Context context) { List participants = new ArrayList<>(); if (dcChat!=null) { - DcContext dcContext = DcHelper.getContext(context); + DcContext dcContext = DcHelper.getAccounts(context).getAccount(dcChat.getAccountId()); int[] contactIds = dcContext.getChatContacts(dcChat.getId()); for (int contactId : contactIds) { participants.add(new Recipient(context, dcContext.getContact(contactId))); From 2be2da87d41f56e1a2391dd338a77d2a9dad34c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Sun, 1 Oct 2023 16:25:40 -0400 Subject: [PATCH 110/169] Update src/org/thoughtcrime/securesms/ConversationListFragment.java --- src/org/thoughtcrime/securesms/ConversationListFragment.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index a428a731d..b745e0f59 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -203,7 +203,6 @@ public class ConversationListFragment extends Fragment } public void onNewIntent() { - loadChatlistAsync(); initializeFabClickListener(actionMode != null); } From a7f1c7e014b64a56696ffb19fe89f9ba318933fc Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 2 Oct 2023 21:52:17 +0200 Subject: [PATCH 111/169] update translations --- res/values-es/strings.xml | 16 ++++++++++------ res/values-it/strings.xml | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 104d86b42..d5ebeb0a2 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -31,6 +31,7 @@ Atrás Verificado Cerrar + Cerrar ventana Reenviar Volver a enviar @@ -174,10 +175,10 @@ Archivo Archivos - Aplicación privada + Aplicación - Aplicaciones privadas - Archivos y aplicaciones privadas + Aplicaciones + Archivos y aplicaciones Desconocido Verde @@ -215,7 +216,7 @@ Alternar teclado emoji Editar grupo Nombre e imagen de grupo - Mostrar todas las ubicaciones + Todas las ubicaciones Archivar chat Des-archivar chat Añadir adjunto @@ -320,7 +321,7 @@ Toca para abrir Instancia de videollamada Tu instancia de videollamada - Ejemplos: https://meet.jit.si/$ROOM o basicwebrtc:https://your-server + Ejemplo: https://tu-servidor.org/$ROOM Si el videochat está activado, puedes iniciar un videochat desde cada chat. Los chats de vídeo necesitan una aplicación o un navegador compatible en los dos lados. ¿Usa \"%1$s\" para invitar a otros a la videollamada?\n\nUna vez configurado, puedes iniciar una videollamada desde el chat individual. Esto reemplaza la configuración previa de videollamadas. Si la hubiera. Invitación a videollamada @@ -658,6 +659,8 @@ Administrar claves Usar emoji del sistema Deshabilitar el soporte de emoji integrado de Delta Chat + Usar cámara interna + La cámara interna suele tener menos funcionalidades que la cámara del sistema Acceso a la aplicación Chats Sonidos en el chat @@ -858,7 +861,7 @@ ⚠️ Tu versión de Delta Chat puede estar desactualizada.\n\nEso puede crear problemas porque tus contactos usan nuevas versiones - y tú te estás perdiendo las últimas novedades 😳\nChequea https://get.delta.chat o tu tienda de aplicaciones para actualizaciones. - Ingrese su secreto del sistema para continuar. + Desbloquear para continuar Código QR @@ -908,6 +911,7 @@ No se pudo verificar %1$s. Verificado por %1$s + Verificado por ti Configuración cambiada para %1$s. Los grupos verificados (experimentales) brindan seguridad contra ataques activos. Los miembros son verificados con un segundo factor por otros miembros y los mensajes siempre están encriptados de extremo a extremo. diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 5def0cd19..b33461c37 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -277,7 +277,7 @@ Messaggi del Dispositivo Messaggi generati localmente I messaggi in questa chat vengono generati localmente da Delta Chat. Gli sviluppatori li usano per informarti sugli aggiornamenti o sui problemi di utilizzo. - Benvenuto in Delta Chat! - Delta Chat ha l\'aspetto e lo stile di altre popolari applicazioni di messaggistica, ma non costringe a un controllo centralizzato, al tracciamento o alla vendita tua, dei tuoi amici, colleghi o familiari a grandi organizzazioni.\n\nTecnicamente, Delta Chat è un\'applicazione di posta elettronica con un\'interfaccia moderna. L\'email in una nuova veste 👻\n\nUtilizza Delta Chat con chiunque: basta conoscere il loro indirizzo e-mail. I destinatari non hanno bisogno di installare Delta Chat, visitare siti web o iscriversi da nessuna parte - ma, naturalmente se lo desiderano, puoi suggerirgli 👉 https://get.delta.chat + Benvenuto in Delta Chat! - Delta Chat ha l\'aspetto e lo stile di altre popolari applicazioni di messaggistica, ma non costringe a un controllo centralizzato, al tracciamento o alla vendita dei dati personali tuoi, dei tuoi amici, colleghi o familiari a grandi organizzazioni.\n\nTecnicamente, Delta Chat è un\'applicazione di posta elettronica con un\'interfaccia moderna. L\'e-mail in una nuova veste 👻\n\nUtilizza Delta Chat con chiunque: basta conoscere il loro indirizzo e-mail. I destinatari non hanno bisogno di installare Delta Chat, visitare siti web o iscriversi da nessuna parte - ma, naturalmente se lo desiderano, puoi suggerirgli 👉 https://get.delta.chat Modifica Contatto Fissa Chat @@ -659,6 +659,8 @@ Gestisci Chiavi Usa Emoji di Sistema Disabilita il supporto delle emoji integrato in Delta Chat + Usa Fotocamera App + La fotocamera dell\'app di solito ha meno funzionalità della fotocamera di sistema Accesso all\'App Chat Suoni In-Chat @@ -909,6 +911,7 @@ Impossibile verificare %1$s Verificato da %1$s + Verificato da te Impostazioni modificate per %1$s I gruppi verificati (sperimentali) garantiscono sicurezza dagli attacchi. I membri vengono verificati con un secondo fattore dagli altri membri e i messaggi sono sempre cifrati end-to-end. From f18831b196034f32b92fcfe295009376cc07db2d Mon Sep 17 00:00:00 2001 From: bjoern Date: Tue, 3 Oct 2023 00:42:20 +0200 Subject: [PATCH 112/169] set targetSdkVersion to 33 (#2649) * set targetSdkVersion to 33 * api33 requires permission NEARBY_WIFI_DEVICES to access wifi not sure, if this affects getSystemService(Context.WIFI_SERVICE), however, we anyway do not ask for permissions here but just try/catch - if things do not work, we just cannot get the wifi name (we're not asking for permission as this would require LOCATION in the past - and that would scare users that just installed Delta Chat and select "Add Second Devive". this is the exact reason why NEARBY_WIFI_DEVICES was introduced, btw. so in case getting the Wifi name does not work on api33, we can consider asking for a permission - would still be on startup, however) * update storage permissions in manifest according to https://developer.android.com/training/data-storage/shared/media#storage-permission * also update compileSdkVersion * api33: adapt audio permission request * api33: adapt gallery permission request * request correct permissions for the 'photo rail' * request correct permissions for avatar selection * api33: storage and audio permission not needed * add comment wrt 'camera roll' * add POST_NOTIFICATIONS to the manifest, this already allows to enable notifications in the system settings * ask for POST_NOTIFICATIONS permission on startup * explain how to re-enable notifications if initially disabled * prefer a device message over an alert * show in settings if notifications are system-disabled --- AndroidManifest.xml | 5 +++- build.gradle | 4 +-- res/values/strings.xml | 2 ++ .../ApplicationPreferencesActivity.java | 12 ++++++++- .../securesms/ConversationListActivity.java | 7 +++++ .../securesms/ConversationListFragment.java | 27 ++++++++++++++++++- .../components/AttachmentTypeSelector.java | 2 +- .../securesms/components/AvatarSelector.java | 2 +- .../database/loaders/RecentPhotosLoader.java | 2 +- .../securesms/mms/AttachmentManager.java | 4 +-- .../securesms/permissions/Permissions.java | 27 ++++++++++++++++++- .../NotificationsPreferenceFragment.java | 9 ++++--- .../securesms/qr/BackupTransferActivity.java | 2 +- .../thoughtcrime/securesms/util/Prefs.java | 1 + 14 files changed, 91 insertions(+), 15 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index e8bc7eee6..bddd78e96 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -14,7 +14,10 @@ - + + + + diff --git a/build.gradle b/build.gradle index a7cc38fda..89918e8e2 100644 --- a/build.gradle +++ b/build.gradle @@ -86,7 +86,7 @@ dependencies { android { namespace "org.thoughtcrime.securesms" flavorDimensions "none" - compileSdkVersion 32 + compileSdkVersion 33 // Set NDK version to strip native libraries. // Even though we compile our libraries outside Gradle with `scripts/ndk-make.sh`, @@ -105,7 +105,7 @@ android { multiDexEnabled true minSdkVersion 16 - targetSdkVersion 32 + targetSdkVersion 33 vectorDrawables.useSupportLibrary = true diff --git a/res/values/strings.xml b/res/values/strings.xml index 278f90145..1983c91b9 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -919,6 +919,7 @@ Name and message Name only No name or message + Notifications disabled @@ -928,6 +929,7 @@ To send audio messages, go to the app settings, select \"Permissions\", and enable \"Microphone\". To receive or send files, go to the app settings, select \"Permissions\", and enable \"Storage\". To attach a location, go to the app settings, select \"Permissions\", and enable \"Location\". + To receive notifications, go to \"System Settings / Apps / Delta Chat\" and enable \"Notifications\". Draw anywhere to blur diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 88eb68c12..d6a0b9494 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -17,6 +17,7 @@ */ package org.thoughtcrime.securesms; +import android.Manifest; import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; @@ -247,7 +248,16 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA switch (category) { case PREFERENCE_CATEGORY_NOTIFICATIONS: - fragment = new NotificationsPreferenceFragment(); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || Permissions.hasAll(getActivity(), Manifest.permission.POST_NOTIFICATIONS)) { + fragment = new NotificationsPreferenceFragment(); + } else { + new AlertDialog.Builder(getActivity()) + .setTitle(R.string.notifications_disabled) + .setMessage(R.string.perm_explain_access_to_notifications_denied) + .setPositiveButton(R.string.perm_continue, (dialog, which) -> getActivity().startActivity(Permissions.getApplicationSettingsIntent(getActivity()))) + .setNegativeButton(android.R.string.cancel, null) + .show(); + } break; case PREFERENCE_CATEGORY_CONNECTIVITY: startActivity(new Intent(getActivity(), ConnectivityActivity.class)); diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index 0b65ed419..a7ef9f272 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -41,6 +41,7 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.TooltipCompat; @@ -58,6 +59,7 @@ import org.thoughtcrime.securesms.connect.DcHelper; import org.thoughtcrime.securesms.connect.DirectShareUtil; import org.thoughtcrime.securesms.map.MapActivity; import org.thoughtcrime.securesms.mms.GlideApp; +import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.qr.QrActivity; import org.thoughtcrime.securesms.qr.QrCodeHandler; import org.thoughtcrime.securesms.recipients.Recipient; @@ -443,4 +445,9 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit break; } } + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults); + } } diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index b745e0f59..93c7e3f04 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -16,6 +16,7 @@ */ package org.thoughtcrime.securesms; +import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; @@ -50,6 +51,7 @@ import com.b44t.messenger.DcChat; import com.b44t.messenger.DcChatlist; import com.b44t.messenger.DcContext; import com.b44t.messenger.DcEvent; +import com.b44t.messenger.DcMsg; import com.google.android.material.snackbar.Snackbar; import org.thoughtcrime.securesms.ConversationListAdapter.ItemClickListener; @@ -60,6 +62,8 @@ import org.thoughtcrime.securesms.connect.DcEventCenter; import org.thoughtcrime.securesms.connect.DcHelper; import org.thoughtcrime.securesms.connect.DirectShareUtil; import org.thoughtcrime.securesms.mms.GlideApp; +import org.thoughtcrime.securesms.permissions.Permissions; +import org.thoughtcrime.securesms.util.Prefs; import org.thoughtcrime.securesms.util.RelayUtil; import org.thoughtcrime.securesms.util.SendRelayedMessageUtil; import org.thoughtcrime.securesms.util.Util; @@ -267,7 +271,28 @@ public class ConversationListFragment extends Fragment @Override protected void onPostExecute(Void result) { - DozeReminder.maybeAskDirectly(getActivity()); + Activity activity = ConversationListFragment.this.getActivity(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (!Prefs.getBooleanPreference(activity, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, false)) { + Prefs.setBooleanPreference(activity, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, true); + Permissions.with(activity) + .request(Manifest.permission.POST_NOTIFICATIONS) + .ifNecessary() + .onAllGranted(() -> { + DozeReminder.maybeAskDirectly(getActivity()); + }) + .onAnyDenied(() -> { + final DcContext dcContext = DcHelper.getContext(activity); + DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); + msg.setText("\uD83D\uDC49 "+activity.getString(R.string.notifications_disabled)+" \uD83D\uDC48\n\n" + +activity.getString(R.string.perm_explain_access_to_notifications_denied)); + dcContext.addDeviceMsg("android.notifications-disabled", msg); + }) + .execute(); + } + } else { + DozeReminder.maybeAskDirectly(getActivity()); + } } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, getActivity()); } diff --git a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java index af9935a99..e36165969 100644 --- a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java +++ b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java @@ -116,7 +116,7 @@ public class AttachmentTypeSelector extends PopupWindow { } public void show(@NonNull Activity activity, final @NonNull View anchor) { - if (Permissions.hasAll(activity, Manifest.permission.READ_EXTERNAL_STORAGE)) { + if (Permissions.hasAll(activity, Permissions.galleryPermissions())) { recentRail.setVisibility(View.VISIBLE); loaderManager.restartLoader(1, null, recentRail); } else { diff --git a/src/org/thoughtcrime/securesms/components/AvatarSelector.java b/src/org/thoughtcrime/securesms/components/AvatarSelector.java index ecf987462..32efee766 100644 --- a/src/org/thoughtcrime/securesms/components/AvatarSelector.java +++ b/src/org/thoughtcrime/securesms/components/AvatarSelector.java @@ -80,7 +80,7 @@ public class AvatarSelector extends PopupWindow { } public void show(@NonNull Activity activity, final @NonNull View anchor) { - if (Permissions.hasAll(activity, Manifest.permission.READ_EXTERNAL_STORAGE)) { + if (Permissions.hasAll(activity, Permissions.galleryPermissions())) { recentRail.setVisibility(View.VISIBLE); loaderManager.restartLoader(1, null, recentRail); } else { diff --git a/src/org/thoughtcrime/securesms/database/loaders/RecentPhotosLoader.java b/src/org/thoughtcrime/securesms/database/loaders/RecentPhotosLoader.java index 2eecc1801..b9dd34c74 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/RecentPhotosLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/RecentPhotosLoader.java @@ -36,7 +36,7 @@ public class RecentPhotosLoader extends CursorLoader { @Override public Cursor loadInBackground() { - if (Permissions.hasAll(context, Manifest.permission.READ_EXTERNAL_STORAGE)) { + if (Permissions.hasAll(context, Permissions.galleryPermissions())) { return context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, PROJECTION, SELECTION, null, MediaStore.Images.ImageColumns.DATE_MODIFIED + " DESC"); diff --git a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java index d30220f2b..b14fd1f14 100644 --- a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java +++ b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java @@ -445,7 +445,7 @@ public class AttachmentManager { public static void selectGallery(Activity activity, int requestCode) { Permissions.with(activity) - .request(Manifest.permission.READ_EXTERNAL_STORAGE) + .request(Permissions.galleryPermissions()) .ifNecessary() .withPermanentDenialDialog(activity.getString(R.string.perm_explain_access_to_storage_denied)) .onAllGranted(() -> selectMediaType(activity, "image/*", new String[] {"image/*", "video/*"}, requestCode)) @@ -454,7 +454,7 @@ public class AttachmentManager { public static void selectImage(Activity activity, int requestCode) { Permissions.with(activity) - .request(Manifest.permission.READ_EXTERNAL_STORAGE) + .request(Permissions.galleryPermissions()) .ifNecessary() .withPermanentDenialDialog(activity.getString(R.string.perm_explain_access_to_storage_denied)) .onAllGranted(() -> selectMediaType(activity, "image/*", null, requestCode)) diff --git a/src/org/thoughtcrime/securesms/permissions/Permissions.java b/src/org/thoughtcrime/securesms/permissions/Permissions.java index a808816ec..caee223ac 100644 --- a/src/org/thoughtcrime/securesms/permissions/Permissions.java +++ b/src/org/thoughtcrime/securesms/permissions/Permissions.java @@ -1,6 +1,7 @@ package org.thoughtcrime.securesms.permissions; +import android.Manifest; import android.app.Activity; import androidx.appcompat.app.AlertDialog; import android.content.Context; @@ -34,6 +35,18 @@ import java.util.Map; public class Permissions { + public static String[] galleryPermissions() { + // on modern androids, the gallery picker works without permissions, + // however, the "camera roll" still requires permissions. + // to get that dialog at a UX-wise good moment, we still always ask for permission when opening gallery. + // just-always-asking this also avoids the mess with handling various paths for various apis. + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO}; + } else { + return new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}; + } + } + private static final Map OUTSTANDING = new LRUCache<>(2); public static PermissionsBuilder with(@NonNull Activity activity) { @@ -134,6 +147,18 @@ public class Permissions { } public void execute() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + // READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE does not exist on modern androids + // as file access is done by pickers + String[] r = requestedPermissions; + Arrays.sort(r); + if ( (r.length == 1 && (r[0].equals(Manifest.permission.READ_EXTERNAL_STORAGE) || r[0].equals(Manifest.permission.WRITE_EXTERNAL_STORAGE))) + || (r.length == 2 && r[0].equals(Manifest.permission.READ_EXTERNAL_STORAGE) && r[1].equals(Manifest.permission.WRITE_EXTERNAL_STORAGE)) ) { + allGrantedListener.run(); + return; + } + } + PermissionsRequest request = new PermissionsRequest(allGrantedListener, anyDeniedListener, anyPermanentlyDeniedListener, anyResultListener, someGrantedListener, someDeniedListener, somePermanentlyDeniedListener); @@ -247,7 +272,7 @@ public class Permissions { resultListener.onResult(permissions, grantResults, shouldShowRationaleDialog); } - private static Intent getApplicationSettingsIntent(@NonNull Context context) { + public static Intent getApplicationSettingsIntent(@NonNull Context context) { Intent intent = new Intent(); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", context.getPackageName(), null); diff --git a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java index 37bbdf630..92fa60afd 100644 --- a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java @@ -21,6 +21,7 @@ import android.text.TextUtils; import org.thoughtcrime.securesms.ApplicationPreferencesActivity; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.connect.KeepAliveService; +import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.util.Prefs; import static android.app.Activity.RESULT_OK; @@ -198,8 +199,10 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme } public static CharSequence getSummary(Context context) { - boolean notificationsEnabled = Prefs.isNotificationsEnabled(context); - String ret = context.getString(notificationsEnabled ? R.string.on : R.string.off); - return ret; + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || Permissions.hasAll(context, Manifest.permission.POST_NOTIFICATIONS)) { + return context.getString(Prefs.isNotificationsEnabled(context) ? R.string.on : R.string.off); + } else { + return context.getString(R.string.disabled_in_system_settings); + } } } diff --git a/src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java b/src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java index a9f75d0b0..fadf4b5fc 100644 --- a/src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java +++ b/src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java @@ -206,7 +206,7 @@ public class BackupTransferActivity extends BaseActionBarActivity { new Thread(() -> { try { // depending on the android version, getting the SSID requires none, all or one of - // ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE and maybe even more. + // ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, NEARBY_WIFI_DEVICES, ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE and maybe even more. final WifiManager wifiManager = (WifiManager)activity.getApplicationContext().getSystemService(Context.WIFI_SERVICE); if (wifiManager.isWifiEnabled()) { final WifiInfo info = wifiManager.getConnectionInfo(); diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index eb20519af..c127de055 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -49,6 +49,7 @@ public class Prefs { private static final String ENTER_SENDS_PREF = "pref_enter_sends"; private static final String PROMPTED_DOZE_MSG_ID_PREF = "pref_prompted_doze_msg_id"; public static final String DOZE_ASKED_DIRECTLY = "pref_doze_asked_directly"; + public static final String ASKED_FOR_NOTIFICATION_PERMISSION= "pref_asked_for_notification_permission"; private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications"; public static final String MESSAGE_BODY_TEXT_SIZE_PREF = "pref_message_body_text_size"; From 6addd6f8fdd3755a59b67620416123240b9abf38 Mon Sep 17 00:00:00 2001 From: bjoern Date: Tue, 3 Oct 2023 13:26:45 +0200 Subject: [PATCH 113/169] check areNotificationsEnabled() before adding notification (#2697) this is best-practise according to https://developer.android.com/develop/ui/views/notifications/notification-permission moreover, use the same check for displaying the settings. --- .../securesms/ApplicationPreferencesActivity.java | 4 +++- .../securesms/notifications/NotificationCenter.java | 7 +++++-- .../preferences/NotificationsPreferenceFragment.java | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index d6a0b9494..75ae6e657 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -31,6 +31,7 @@ import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; +import androidx.core.app.NotificationManagerCompat; import androidx.core.content.ContextCompat; import androidx.core.graphics.drawable.DrawableCompat; import androidx.fragment.app.Fragment; @@ -248,7 +249,8 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA switch (category) { case PREFERENCE_CATEGORY_NOTIFICATIONS: - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || Permissions.hasAll(getActivity(), Manifest.permission.POST_NOTIFICATIONS)) { + NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getActivity()); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || notificationManager.areNotificationsEnabled()) { fragment = new NotificationsPreferenceFragment(); } else { new AlertDialog.Builder(getActivity()) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index d751144fd..7f1d46c38 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -337,6 +337,11 @@ public class NotificationCenter { return; } + NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && !notificationManager.areNotificationsEnabled()) { + return; + } + if (Util.equals(visibleChat, chatData)) { if (Prefs.isInChatNotifications(context)) { InChatSounds.getInstance(context).playIncomingSound(); @@ -344,8 +349,6 @@ public class NotificationCenter { return; } - NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); - // get notification text as a single line NotificationPrivacyPreference privacy = Prefs.getNotificationPrivacy(context); diff --git a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java index 92fa60afd..60341dff7 100644 --- a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java @@ -12,6 +12,7 @@ import android.os.Bundle; import android.os.PowerManager; import android.provider.Settings; import androidx.annotation.Nullable; +import androidx.core.app.NotificationManagerCompat; import androidx.core.content.ContextCompat; import androidx.preference.CheckBoxPreference; import androidx.preference.ListPreference; @@ -199,7 +200,8 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme } public static CharSequence getSummary(Context context) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || Permissions.hasAll(context, Manifest.permission.POST_NOTIFICATIONS)) { + NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || notificationManager.areNotificationsEnabled()) { return context.getString(Prefs.isNotificationsEnabled(context) ? R.string.on : R.string.off); } else { return context.getString(R.string.disabled_in_system_settings); From 66d4a5d88467d720b9e68812492b1c6ef79f0356 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 3 Oct 2023 18:25:58 +0200 Subject: [PATCH 114/169] resume settings activity on language changes this applies changed immediately, so esp. right-to-left-changes are correct - but also weird issues wrt wrong language in the title bar on some api should be fixed. little downside is that after changing the language, you're back to the "main settings page" and do not stay in the "appearance page"; but you can regard this also as a feature, one tap less. (reason is that the activity is resumed on language changes and the underlying intent does not track fragments currently) --- .../thoughtcrime/securesms/ApplicationPreferencesActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 75ae6e657..08a35ad7e 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -122,7 +122,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA DynamicTheme.setDefaultDayNightMode(this); recreate(); } else if (key.equals(Prefs.LANGUAGE_PREF)) { - recreate(); + dynamicLanguage.onResume(this); } } From 479305198c9c283c0647b34dafda173e25dee425 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 3 Oct 2023 21:10:16 +0200 Subject: [PATCH 115/169] finish settings on language changes if we do not stay in the appearance page, it makes more sense to quit the settings completely. also, this removes potential other issues with the language change as there is really only the chatlist that needs an update --- .../thoughtcrime/securesms/ApplicationPreferencesActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index 08a35ad7e..c88be36dd 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -122,7 +122,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA DynamicTheme.setDefaultDayNightMode(this); recreate(); } else if (key.equals(Prefs.LANGUAGE_PREF)) { - dynamicLanguage.onResume(this); + finish(); } } From 1e149eef8361494de5dbf66751f39a5bb276995f Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 3 Oct 2023 21:46:36 +0200 Subject: [PATCH 116/169] improve screen reader support in conversations --- res/layout/conversation_item_footer.xml | 2 +- res/layout/conversation_item_received.xml | 1 + res/layout/conversation_item_sent.xml | 1 + .../securesms/BaseConversationItem.java | 6 ++ .../securesms/ConversationItem.java | 56 ++++++++++++++++++- .../securesms/components/AudioView.java | 24 ++++++++ .../components/ConversationItemFooter.java | 9 +++ .../components/ConversationItemThumbnail.java | 9 +++ .../components/DeliveryStatusView.java | 7 +++ .../securesms/components/DocumentView.java | 7 +++ .../securesms/components/ThumbnailView.java | 8 +++ .../securesms/components/WebxdcView.java | 9 +++ 12 files changed, 137 insertions(+), 2 deletions(-) diff --git a/res/layout/conversation_item_footer.xml b/res/layout/conversation_item_footer.xml index 170f60666..4ac5a5791 100644 --- a/res/layout/conversation_item_footer.xml +++ b/res/layout/conversation_item_footer.xml @@ -15,7 +15,7 @@ android:src="@drawable/msg_encr_out" android:visibility="gone" android:layout_gravity="center_vertical|end" - android:contentDescription="@string/chat_input_placeholder" + android:importantForAccessibility="no" tools:visibility="visible"/> diff --git a/res/layout/conversation_item_sent.xml b/res/layout/conversation_item_sent.xml index 6937a1bbf..f5019c7c8 100644 --- a/res/layout/conversation_item_sent.xml +++ b/res/layout/conversation_item_sent.xml @@ -142,6 +142,7 @@ android:paddingTop="@dimen/message_bubble_top_padding" android:textColor="?conversation_item_outgoing_text_primary_color" android:textColorLink="?conversation_item_outgoing_text_primary_color" + android:importantForAccessibility="no" app:scaleEmojis="true" tools:text="Mango pickle lorem ipsum"/> diff --git a/src/org/thoughtcrime/securesms/BaseConversationItem.java b/src/org/thoughtcrime/securesms/BaseConversationItem.java index 22de4553b..695901b2f 100644 --- a/src/org/thoughtcrime/securesms/BaseConversationItem.java +++ b/src/org/thoughtcrime/securesms/BaseConversationItem.java @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms; import android.content.Context; import android.util.AttributeSet; import android.view.View; +import android.view.accessibility.AccessibilityManager; import android.widget.LinearLayout; import android.widget.TextView; @@ -77,6 +78,8 @@ public abstract class BaseConversationItem extends LinearLayout return batchSelected.isEmpty() && (messageRecord.isFailed()); } + protected void onAccessibilityClick() {} + protected class PassthroughClickListener implements View.OnLongClickListener, View.OnClickListener { @Override @@ -103,6 +106,9 @@ public abstract class BaseConversationItem extends LinearLayout public void onClick(View v) { if (!shouldInterceptClicks(messageRecord) && parent != null) { + if (batchSelected.isEmpty() && ((AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE)).isTouchExplorationEnabled()) { + BaseConversationItem.this.onAccessibilityClick(); + } parent.onClick(v); } else if (messageRecord.isFailed()) { View view = View.inflate(context, R.layout.message_details_view, null); diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index f340c8f06..e4dd5c6d4 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -22,6 +22,7 @@ import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.Rect; +import android.os.Build; import android.text.SpannableString; import android.text.TextUtils; import android.util.AttributeSet; @@ -193,6 +194,7 @@ public class ConversationItem extends BaseConversationItem setReactions(messageRecord); setFooter(messageRecord, locale); setQuote(messageRecord); + setContentDescription(messageRecord); } @@ -305,6 +307,36 @@ public class ConversationItem extends BaseConversationItem } } + private void setContentDescription(DcMsg messageRecord) { + String desc = ""; + if (groupSenderHolder.getVisibility() == View.VISIBLE) { + desc = groupSender.getText() + "\n"; + } + if (audioViewStub.resolved() && audioViewStub.get().getVisibility() == View.VISIBLE) { + desc += audioViewStub.get().getDescription() + "\n"; + } else if (documentViewStub.resolved() && documentViewStub.get().getVisibility() == View.VISIBLE) { + desc += documentViewStub.get().getDescription() + "\n"; + } else if (webxdcViewStub.resolved() && webxdcViewStub.get().getVisibility() == View.VISIBLE) { + desc += webxdcViewStub.get().getDescription() + "\n"; + } else if (mediaThumbnailStub.resolved() && mediaThumbnailStub.get().getVisibility() == View.VISIBLE) { + desc += mediaThumbnailStub.get().getDescription() + "\n"; + } else if (stickerStub.resolved() && stickerStub.get().getVisibility() == View.VISIBLE) { + desc += context.getString(R.string.sticker) + "\n"; + } + + if (bodyText.getVisibility() == View.VISIBLE) { + desc += bodyText.getText() + "\n"; + } + + if (footer.getVisibility() == View.VISIBLE) { + desc += footer.getDescription() + "\n"; + } else if (stickerFooter.getVisibility() == View.VISIBLE) { + desc += stickerFooter.getDescription() + "\n"; + } + + this.setContentDescription(desc); + } + private boolean hasAudio(DcMsg messageRecord) { int type = messageRecord.getType(); return type==DcMsg.DC_MSG_AUDIO || type==DcMsg.DC_MSG_VOICE; @@ -447,6 +479,9 @@ public class ConversationItem extends BaseConversationItem audioViewStub.get().setAudio(new AudioSlide(context, messageRecord), duration); audioViewStub.get().setOnLongClickListener(passthroughClickListener); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + audioViewStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); + } ViewUtil.updateLayoutParams(bodyText, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewUtil.updateLayoutParams(groupSenderHolder, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); @@ -463,6 +498,9 @@ public class ConversationItem extends BaseConversationItem documentViewStub.get().setDocument(new DocumentSlide(context, messageRecord)); documentViewStub.get().setDocumentClickListener(new ThumbnailClickListener()); documentViewStub.get().setOnLongClickListener(passthroughClickListener); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + documentViewStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); + } ViewUtil.updateLayoutParams(bodyText, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewUtil.updateLayoutParams(groupSenderHolder, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); @@ -478,6 +516,9 @@ public class ConversationItem extends BaseConversationItem webxdcViewStub.get().setWebxdc(messageRecord, context.getString(R.string.webxdc_app)); webxdcViewStub.get().setWebxdcClickListener(new ThumbnailClickListener()); webxdcViewStub.get().setOnLongClickListener(passthroughClickListener); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + webxdcViewStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); + } ViewUtil.updateLayoutParams(bodyText, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewUtil.updateLayoutParams(groupSenderHolder, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); @@ -512,6 +553,9 @@ public class ConversationItem extends BaseConversationItem mediaThumbnailStub.get().setOnLongClickListener(passthroughClickListener); mediaThumbnailStub.get().setOnClickListener(passthroughClickListener); mediaThumbnailStub.get().showShade(TextUtils.isEmpty(messageRecord.getText())); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + mediaThumbnailStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); + } setThumbnailOutlineCorners(messageRecord, showSender); @@ -531,9 +575,11 @@ public class ConversationItem extends BaseConversationItem stickerStub.get().setSlide(glideRequests, new StickerSlide(context, messageRecord)); stickerStub.get().setThumbnailClickListener(new StickerClickListener()); - stickerStub.get().setOnLongClickListener(passthroughClickListener); stickerStub.get().setOnClickListener(passthroughClickListener); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + stickerStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); + } ViewUtil.updateLayoutParams(bodyText, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewUtil.updateLayoutParams(groupSenderHolder, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); @@ -792,6 +838,14 @@ public class ConversationItem extends BaseConversationItem return availableWidth; } + @Override + public void onAccessibilityClick() { + if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().performClick(); + else if (audioViewStub.resolved()) audioViewStub.get().performClick(); + else if (documentViewStub.resolved()) documentViewStub.get().performClick(); + else if (webxdcViewStub.resolved()) webxdcViewStub.get().performClick(); + } + /// Event handlers private class ThumbnailClickListener implements SlideClickListener { diff --git a/src/org/thoughtcrime/securesms/components/AudioView.java b/src/org/thoughtcrime/securesms/components/AudioView.java index 04474eca5..9383f2ef3 100644 --- a/src/org/thoughtcrime/securesms/components/AudioView.java +++ b/src/org/thoughtcrime/securesms/components/AudioView.java @@ -93,6 +93,30 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener } } + @Override + public boolean performClick() { + if (this.playButton.getVisibility() == View.VISIBLE) { + playButton.performClick(); + } else { + pauseButton.performClick(); + } + return super.performClick(); + } + + public String getDescription() { + String desc; + if (this.title.getVisibility() == View.VISIBLE) { + desc = getContext().getString(R.string.audio); + } else { + desc = getContext().getString(R.string.voice_message); + } + desc += "\n" + this.timestamp.getText(); + if (title.getVisibility() == View.VISIBLE) { + desc += "\n" + this.title.getText(); + } + return desc; + } + public void setDuration(int duration) { if (getProgress()==0) this.timestamp.setText(DateUtils.getFormatedDuration(duration)); diff --git a/src/org/thoughtcrime/securesms/components/ConversationItemFooter.java b/src/org/thoughtcrime/securesms/components/ConversationItemFooter.java index 69ccc01cd..2c8761f94 100644 --- a/src/org/thoughtcrime/securesms/components/ConversationItemFooter.java +++ b/src/org/thoughtcrime/securesms/components/ConversationItemFooter.java @@ -100,4 +100,13 @@ public class ConversationItemFooter extends LinearLayout { deliveryStatusView.setTint(textColor); // Reset the color to the standard color (because the footer is re-used in a RecyclerView) } } + + public String getDescription() { + String desc = dateView.getText().toString(); + String deliveryDesc = deliveryStatusView.getDescription(); + if (!"".equals(deliveryDesc)) { + desc += "\n" + deliveryDesc; + } + return desc; + } } diff --git a/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java b/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java index 8837ab6f6..1f8fd8337 100644 --- a/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java +++ b/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java @@ -86,6 +86,10 @@ public class ConversationItemThumbnail extends FrameLayout { setTouchDelegate(thumbnail.getTouchDelegate()); } + public String getDescription() { + return thumbnail.getDescription() + "\n" + footer.getDescription(); + } + @Override protected void onMeasure(int originalWidthMeasureSpec, int originalHeightMeasureSpec) { int width = MeasureSpec.getSize(originalWidthMeasureSpec); @@ -185,6 +189,11 @@ public class ConversationItemThumbnail extends FrameLayout { thumbnail.setThumbnailClickListener(listener); } + @Override + public boolean performClick() { + return thumbnail.performClick(); + } + @UiThread public void setImageResource(@NonNull GlideRequests glideRequests, @NonNull Slide slide, int naturalWidth, int naturalHeight) diff --git a/src/org/thoughtcrime/securesms/components/DeliveryStatusView.java b/src/org/thoughtcrime/securesms/components/DeliveryStatusView.java index 040631f57..b4db7fb68 100644 --- a/src/org/thoughtcrime/securesms/components/DeliveryStatusView.java +++ b/src/org/thoughtcrime/securesms/components/DeliveryStatusView.java @@ -123,4 +123,11 @@ public class DeliveryStatusView { public void resetTint() { deliveryIndicator.setColorFilter(null); } + + public String getDescription() { + if (deliveryIndicator.getVisibility() == View.VISIBLE) { + return deliveryIndicator.getContentDescription().toString(); + } + return ""; + } } diff --git a/src/org/thoughtcrime/securesms/components/DocumentView.java b/src/org/thoughtcrime/securesms/components/DocumentView.java index 5e0ebf31d..b8769eb4a 100644 --- a/src/org/thoughtcrime/securesms/components/DocumentView.java +++ b/src/org/thoughtcrime/securesms/components/DocumentView.java @@ -59,6 +59,13 @@ public class DocumentView extends FrameLayout { this.setOnClickListener(new OpenClickedListener(documentSlide)); } + public String getDescription() { + String desc = getContext().getString(R.string.file); + desc += "\n" + fileName.getText(); + desc += "\n" + fileSize.getText(); + return desc; + } + @Override public void setFocusable(boolean focusable) { super.setFocusable(focusable); diff --git a/src/org/thoughtcrime/securesms/components/ThumbnailView.java b/src/org/thoughtcrime/securesms/components/ThumbnailView.java index db7149f00..6efd8702c 100644 --- a/src/org/thoughtcrime/securesms/components/ThumbnailView.java +++ b/src/org/thoughtcrime/securesms/components/ThumbnailView.java @@ -82,6 +82,14 @@ public class ThumbnailView extends FrameLayout { } + public String getDescription() { + if (slide != null && slide.hasPlayOverlay()) { + return getContext().getString(R.string.video); + } else { + return getContext().getString(R.string.image); + } + } + @Override protected void onMeasure(int originalWidthMeasureSpec, int originalHeightMeasureSpec) { fillTargetDimensions(measureDimens, dimens, bounds); diff --git a/src/org/thoughtcrime/securesms/components/WebxdcView.java b/src/org/thoughtcrime/securesms/components/WebxdcView.java index ea8e9b5a9..a93904673 100644 --- a/src/org/thoughtcrime/securesms/components/WebxdcView.java +++ b/src/org/thoughtcrime/securesms/components/WebxdcView.java @@ -89,6 +89,15 @@ public class WebxdcView extends FrameLayout { appSubtitle.setText(summary); } + public String getDescription() { + String desc = getContext().getString(R.string.webxdc_app); + desc += "\n" + appName.getText(); + if (appSubtitle.getText() != null && !appSubtitle.getText().toString().equals("") && !appSubtitle.getText().toString().equals(getContext().getString(R.string.webxdc_app))) { + desc += "\n" + appSubtitle.getText(); + } + return desc; + } + private class OpenClickedListener implements View.OnClickListener { private final @NonNull DocumentSlide slide; From 27466decf52733e4080b3d6380bce2f2dcd30381 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 3 Oct 2023 22:07:55 +0200 Subject: [PATCH 117/169] remove unnecessary description --- res/layout/conversation_item_received_sticker.xml | 3 +-- res/layout/conversation_item_sent_sticker.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/res/layout/conversation_item_received_sticker.xml b/res/layout/conversation_item_received_sticker.xml index 6e24028f8..5eee02acf 100644 --- a/res/layout/conversation_item_received_sticker.xml +++ b/res/layout/conversation_item_received_sticker.xml @@ -3,5 +3,4 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/image_view" android:layout_width="@dimen/media_bubble_sticker_dimens" - android:layout_height="@dimen/media_bubble_sticker_dimens" - android:contentDescription="@string/image" /> + android:layout_height="@dimen/media_bubble_sticker_dimens"/> diff --git a/res/layout/conversation_item_sent_sticker.xml b/res/layout/conversation_item_sent_sticker.xml index 6e24028f8..5eee02acf 100644 --- a/res/layout/conversation_item_sent_sticker.xml +++ b/res/layout/conversation_item_sent_sticker.xml @@ -3,5 +3,4 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/image_view" android:layout_width="@dimen/media_bubble_sticker_dimens" - android:layout_height="@dimen/media_bubble_sticker_dimens" - android:contentDescription="@string/image" /> + android:layout_height="@dimen/media_bubble_sticker_dimens"/> From 8300242d0f3766009113bf7623908b522543a10b Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 3 Oct 2023 22:11:25 +0200 Subject: [PATCH 118/169] set some descriptions --- res/layout/conversation_item_received_sticker.xml | 3 ++- res/layout/conversation_item_sent_sticker.xml | 3 ++- res/layout/recent_photo_view_item.xml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/res/layout/conversation_item_received_sticker.xml b/res/layout/conversation_item_received_sticker.xml index 5eee02acf..f597ffdc0 100644 --- a/res/layout/conversation_item_received_sticker.xml +++ b/res/layout/conversation_item_received_sticker.xml @@ -3,4 +3,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/image_view" android:layout_width="@dimen/media_bubble_sticker_dimens" - android:layout_height="@dimen/media_bubble_sticker_dimens"/> + android:layout_height="@dimen/media_bubble_sticker_dimens" + android:contentDescription="@string/sticker" /> diff --git a/res/layout/conversation_item_sent_sticker.xml b/res/layout/conversation_item_sent_sticker.xml index 5eee02acf..f597ffdc0 100644 --- a/res/layout/conversation_item_sent_sticker.xml +++ b/res/layout/conversation_item_sent_sticker.xml @@ -3,4 +3,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/image_view" android:layout_width="@dimen/media_bubble_sticker_dimens" - android:layout_height="@dimen/media_bubble_sticker_dimens"/> + android:layout_height="@dimen/media_bubble_sticker_dimens" + android:contentDescription="@string/sticker" /> diff --git a/res/layout/recent_photo_view_item.xml b/res/layout/recent_photo_view_item.xml index b59d2ab48..d713a2cec 100644 --- a/res/layout/recent_photo_view_item.xml +++ b/res/layout/recent_photo_view_item.xml @@ -11,7 +11,8 @@ + android:scaleType="centerCrop" + android:contentDescription="@string/image"/> From 9325f276988877c47749a2003fa15f7862739cb4 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 3 Oct 2023 22:57:15 +0200 Subject: [PATCH 119/169] use only one `audioFocusChangeListener` use only one `audioFocusChangeListener` as otherwise the "old" will immediately pause when we restart playing. moreover, this pr switches to the new `requestAudioFocus()` api --- .../securesms/components/AudioView.java | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/AudioView.java b/src/org/thoughtcrime/securesms/components/AudioView.java index 04474eca5..f148e6144 100644 --- a/src/org/thoughtcrime/securesms/components/AudioView.java +++ b/src/org/thoughtcrime/securesms/components/AudioView.java @@ -6,6 +6,8 @@ import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.AnimatedVectorDrawable; +import android.media.AudioAttributes; +import android.media.AudioFocusRequest; import android.media.AudioManager; import android.os.Build; import androidx.annotation.NonNull; @@ -39,6 +41,7 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener private final @NonNull TextView title; private @Nullable AudioSlidePlayer audioSlidePlayer; + AudioManager.OnAudioFocusChangeListener audioFocusChangeListener; private int backwardsCounter; public AudioView(Context context) { @@ -227,17 +230,32 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener try { Log.w(TAG, "playbutton onClick"); if (audioSlidePlayer != null) { + if (Build.VERSION.SDK_INT >= 26) { + if (audioFocusChangeListener == null) { + audioFocusChangeListener = focusChange -> { + if (focusChange == AudioManager.AUDIOFOCUS_LOSS) { + pauseButton.performClick(); + } + }; + } + + AudioAttributes playbackAttributes = new AudioAttributes.Builder() + .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION) + .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH) + .build(); + + AudioFocusRequest focusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN) + .setAudioAttributes(playbackAttributes) + .setAcceptsDelayedFocusGain(false) + .setWillPauseWhenDucked(false) + .setOnAudioFocusChangeListener(audioFocusChangeListener) + .build(); + + AudioManager audioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); + audioManager.requestAudioFocus(focusRequest); + } + togglePlayToPause(); - AudioManager am = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE); - AudioManager.OnAudioFocusChangeListener focusChangeListener = new AudioManager.OnAudioFocusChangeListener() { - @Override - public void onAudioFocusChange(int focusChange) { - if (focusChange == AudioManager.AUDIOFOCUS_LOSS) { - pauseButton.performClick(); - } - } - }; - am.requestAudioFocus(focusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); audioSlidePlayer.play(getProgress()); } } catch (IOException e) { From 4a4f8b3d2e22c3272ce3224c4399f2f3d3108724 Mon Sep 17 00:00:00 2001 From: bjoern Date: Tue, 3 Oct 2023 23:05:41 +0200 Subject: [PATCH 120/169] Update src/org/thoughtcrime/securesms/components/AudioView.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Asiel Díaz Benítez --- src/org/thoughtcrime/securesms/components/AudioView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/components/AudioView.java b/src/org/thoughtcrime/securesms/components/AudioView.java index f148e6144..c6dca5b9d 100644 --- a/src/org/thoughtcrime/securesms/components/AudioView.java +++ b/src/org/thoughtcrime/securesms/components/AudioView.java @@ -41,7 +41,7 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener private final @NonNull TextView title; private @Nullable AudioSlidePlayer audioSlidePlayer; - AudioManager.OnAudioFocusChangeListener audioFocusChangeListener; + private AudioManager.OnAudioFocusChangeListener audioFocusChangeListener; private int backwardsCounter; public AudioView(Context context) { From 25cca695f924ab652a294db05b8e468d24e12b4e Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 3 Oct 2023 23:55:44 +0200 Subject: [PATCH 121/169] create Util.isTouchExplorationEnabled() --- src/org/thoughtcrime/securesms/BaseConversationItem.java | 4 ++-- src/org/thoughtcrime/securesms/ConversationItem.java | 4 ++-- src/org/thoughtcrime/securesms/util/Util.java | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/BaseConversationItem.java b/src/org/thoughtcrime/securesms/BaseConversationItem.java index 695901b2f..1f615cd2b 100644 --- a/src/org/thoughtcrime/securesms/BaseConversationItem.java +++ b/src/org/thoughtcrime/securesms/BaseConversationItem.java @@ -3,7 +3,6 @@ package org.thoughtcrime.securesms; import android.content.Context; import android.util.AttributeSet; import android.view.View; -import android.view.accessibility.AccessibilityManager; import android.widget.LinearLayout; import android.widget.TextView; @@ -17,6 +16,7 @@ import com.b44t.messenger.DcMsg; import com.b44t.messenger.rpc.Rpc; import org.thoughtcrime.securesms.connect.DcHelper; +import org.thoughtcrime.securesms.util.Util; import java.util.HashSet; import java.util.Set; @@ -106,7 +106,7 @@ public abstract class BaseConversationItem extends LinearLayout public void onClick(View v) { if (!shouldInterceptClicks(messageRecord) && parent != null) { - if (batchSelected.isEmpty() && ((AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE)).isTouchExplorationEnabled()) { + if (batchSelected.isEmpty() && Util.isTouchExplorationEnabled(context)) { BaseConversationItem.this.onAccessibilityClick(); } parent.onClick(v); diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index e4dd5c6d4..f832abfa3 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -194,7 +194,7 @@ public class ConversationItem extends BaseConversationItem setReactions(messageRecord); setFooter(messageRecord, locale); setQuote(messageRecord); - setContentDescription(messageRecord); + if (Util.isTouchExplorationEnabled(context)) setContentDescription(); } @@ -307,7 +307,7 @@ public class ConversationItem extends BaseConversationItem } } - private void setContentDescription(DcMsg messageRecord) { + private void setContentDescription() { String desc = ""; if (groupSenderHolder.getVisibility() == View.VISIBLE) { desc = groupSender.getText() + "\n"; diff --git a/src/org/thoughtcrime/securesms/util/Util.java b/src/org/thoughtcrime/securesms/util/Util.java index 3978a4426..6fc9471fe 100644 --- a/src/org/thoughtcrime/securesms/util/Util.java +++ b/src/org/thoughtcrime/securesms/util/Util.java @@ -33,6 +33,7 @@ import android.text.SpannableString; import android.text.TextUtils; import android.text.style.StyleSpan; import android.util.Log; +import android.view.accessibility.AccessibilityManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -344,4 +345,12 @@ public class Util { lastClickTime = now; return false; } + + public static boolean isTouchExplorationEnabled(Context context) { + try { + return ((AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE)).isTouchExplorationEnabled(); + } catch (Exception e) { + return false; + } + } } From cccbe5aa3c8541ff661b45181632b45c69c17907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Tue, 3 Oct 2023 17:56:11 -0400 Subject: [PATCH 122/169] Update src/org/thoughtcrime/securesms/ConversationItem.java Co-authored-by: bjoern --- src/org/thoughtcrime/securesms/ConversationItem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index f832abfa3..b8a65ca06 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -312,6 +312,7 @@ public class ConversationItem extends BaseConversationItem if (groupSenderHolder.getVisibility() == View.VISIBLE) { desc = groupSender.getText() + "\n"; } + if (audioViewStub.resolved() && audioViewStub.get().getVisibility() == View.VISIBLE) { desc += audioViewStub.get().getDescription() + "\n"; } else if (documentViewStub.resolved() && documentViewStub.get().getVisibility() == View.VISIBLE) { From 6dea636ba3b5b86d7976018f5e6837d3dd466fbf Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 3 Oct 2023 23:57:54 +0200 Subject: [PATCH 123/169] update translations --- res/values-ar/strings.xml | 2 -- res/values-az/strings.xml | 3 --- res/values-bg/strings.xml | 3 --- res/values-bqi/strings.xml | 2 -- res/values-ca/strings.xml | 3 --- res/values-ckb/strings.xml | 3 --- res/values-cs/strings.xml | 3 --- res/values-da/strings.xml | 3 --- res/values-de/strings.xml | 5 +++++ res/values-el/strings.xml | 3 --- res/values-eo/strings.xml | 2 -- res/values-es/strings.xml | 3 --- res/values-eu/strings.xml | 3 --- res/values-fa/strings.xml | 3 --- res/values-fi/strings.xml | 3 --- res/values-fr/strings.xml | 3 --- res/values-gl/strings.xml | 3 --- res/values-hr/strings.xml | 2 -- res/values-hu/strings.xml | 2 -- res/values-in/strings.xml | 3 --- res/values-it/strings.xml | 3 --- res/values-ja/strings.xml | 2 -- res/values-km/strings.xml | 3 --- res/values-ko/strings.xml | 3 --- res/values-lt/strings.xml | 2 -- res/values-nb/strings.xml | 2 -- res/values-nl/strings.xml | 3 --- res/values-pl/strings.xml | 3 --- res/values-pt-rBR/strings.xml | 3 --- res/values-pt/strings.xml | 3 --- res/values-ru/strings.xml | 3 --- res/values-sk/strings.xml | 3 --- res/values-sq/strings.xml | 3 --- res/values-sr/strings.xml | 3 --- res/values-sv/strings.xml | 3 --- res/values-ta/strings.xml | 2 -- res/values-te/strings.xml | 2 -- res/values-tr/strings.xml | 3 --- res/values-uk/strings.xml | 3 --- res/values-zh-rCN/strings.xml | 3 --- 40 files changed, 5 insertions(+), 107 deletions(-) diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 19af216ec..21648f26f 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -207,8 +207,6 @@ الاسم والرسالة الاسم فقط لا إسم ولا رسالة - - منح إحدى الأذونات مطلو استمر diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml index d0f69ccde..eaee0f5e3 100644 --- a/res/values-az/strings.xml +++ b/res/values-az/strings.xml @@ -442,8 +442,6 @@ Ad və mesaj Ancaq ad Adı və ya mesaj yoxdur - - İzin tələb olunur Davam edin @@ -451,7 +449,6 @@ Delta Chat yer əlavə etmək üçün yer icazə tələb edir, lakin daimi olaraq rədd edilmişdir. \"İcazələr\"-i seçin və\"Yerləşmə\" izni verin. Delta Chat, fotoşəkilləri, videoları və ya səsləri əlavə etmək və ya ixrac etmək üçün saxlama icazəsini tələb edir, lakin bu daimi olaraq rədd edildi. Xahiş edirik tətbiq ayarları menyusuna davam edin, \"İzinlər\" seçin və \"Yaddaş\" funksiyasını aktivləşdirin. Delta Chat yer əlavə etmək üçün yer icazə tələb edir, lakin daimi olaraq rədd edilmişdir. \"İcazələr\"-i seçin və\"Yerləşmə\" izni verin. - Şifrələnmiş mesaj diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index 150488d84..bf9f348a4 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -907,8 +907,6 @@ Име и съобщение Само име Без име или съобщение - - Изисква се позволение Продължаване @@ -916,7 +914,6 @@ За да изпращате аудиосъобщения, отидете в настройките на приложението, изберете \"Позволения\" и разрешете \"Микрофон\". За да получавате или изпращате файлове, отидете в настройките на приложението, изберете \"Позволения\" и разрешете \"Съхранение\". За да прикрепите информация за местоположението, отидете в настройките на приложението, изберете \"Позволения\" и разрешете \"Местоположение\". - Рисувайте на произволно място, за да замъглите Добавяне на текст diff --git a/res/values-bqi/strings.xml b/res/values-bqi/strings.xml index 9839a13db..168d3ca3d 100644 --- a/res/values-bqi/strings.xml +++ b/res/values-bqi/strings.xml @@ -370,8 +370,6 @@ nom vo payom têynā nom nom yā payomi nî - - zow fāyl vê dar zêyďên diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index fd1ea427c..4736e40a7 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -633,8 +633,6 @@ Nom i missatge Només nom Ni nom ni missatge - - Es requereix permís Continua @@ -642,7 +640,6 @@ Delta Chat demana accés al micròfon per poder enviar missatges d\'àudio, però li ha estat denegat. Sisplau, vés al menú de configuració de l\'app, busca-hi els \"Permisos\" i habilita\'n el \"Micròfon\". Delta Chat necessita accedir a l’emmagatzematge per adjuntar o exportar fotos, vídeos o àudio, però se li ha denegat permanentment. Aneu al menú de configuració de l\'aplicació, seleccioneu \"Permisos\" i activeu \"Emmagatzematge\". Delta Chat necessita accedir a la ubicació per poder-la adjuntar, però li ha estat denegada de forma permanent. Vés a les preferències del menú de l\'aplicació, tria \"Permisos i activa-hi la \"Ubicació\". - Missatge encriptat diff --git a/res/values-ckb/strings.xml b/res/values-ckb/strings.xml index 68556fee2..6e2073773 100644 --- a/res/values-ckb/strings.xml +++ b/res/values-ckb/strings.xml @@ -543,8 +543,6 @@ ناو و پەیام بەس ناو نە ناو و نە پەیام - - ڕێدان پێویستە بەردەوامبوون @@ -552,7 +550,6 @@ بۆ هەناردنی پەیامی دەنگی، بچۆ بەشی ڕێکخستنەکانی نەرمامێرەکە، لە بەشی \"ڕێگەپێدان\"دا، \"مایک\" چالاک بکەوە. بۆ هەناردن و وەرگرتنی پەڕگەکان، بچۆ بەشی ڕێکخستنەکانی نەرمامێرەکە، لە بەشی \"ڕێگەپێدان\"دا، \"بیرگە\" چالاک بکەوە. بۆ لکاندنی شوێنێک، بچۆ بەشی ڕێکخستنەکانی نەرمامێرەکە، لە بەشی \"ڕێگەپێدان\"دا، \"شوێن\" چالاک بکەوە. - پەیامی شفرەکراو diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 6a9f5c604..097acc618 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -685,8 +685,6 @@ Jméno a zpráva Pouze jméno Ani jméno ani zpráva - - Vyžaduj povolení Pokračuj @@ -694,7 +692,6 @@ K posílání zvukových zpráv jdi do nastavení aplikace, pokračuj do Povolení, a tam povol Mikrofon. Pro příjem a posílání souborů jdi do nastavení aplikace, pokračuj do Povolení, a tam povol Ukládání. K posílání polohy jdi do nastavení aplikace, pokračuj do Povolení, a tam povol Polohu. - Kreslením rozmazávej diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index ba61524f0..29534209d 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -706,8 +706,6 @@ Navn og besked Kun navn Ingen navn eller besked - - Tilladelse påkrævet Fortsæt @@ -715,7 +713,6 @@ Delta Chat kræver mikrofon tilladelse for at sende lydbeskeder, men den er blevet nægtet permanent. Fortsæt til program indstillinger, vælg \"Tilladelser\" og aktiver \"Mikrofon\". Delta Chat kræver lagring tilladelse for at vedhæfte eller eksportere billeder, video eller lyd, men det er blevet afvist permanent. Fortsæt til program indstillings-menuen, vælg \"Tilladelser\" og aktiver \"Lagring\". Delta Chat kræver placering tilladelse for at kunne vedhæfte placering, men det er blevet afvist permanent. Fortsæt til program indstillings-menuen, vælg \"Tilladelser\" og aktiver \"Placering\". - Tegn hvor som helst for at sløre Roter diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index bf2fb731c..b1256117c 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -722,6 +722,9 @@ Symbole Flaggen + + Reaktionen + Alte Nachrichten löschen Nachrichten vom Gerät löschen @@ -916,6 +919,7 @@ Name und Nachricht Nur der Name Kein Name oder Nachricht + Benachrichtigungen deaktiviert @@ -925,6 +929,7 @@ Um Audio-Nachrichten zu senden, bitte in den System-Einstellungen DeltaChat den Zugriff auf das Mikrophon erlauben. Um Dateien zu empfangen oder zu versenden, bitte in den System-Einstellungen Delta Chat den Zugriff auf den Speicher erlauben. Um einen Standort anzuhängen, bitte in den Systemeinstellungen DeltaChat den Zugriff auf \"Standort\" erlauben. + Um Benachrichtigungen zu erhalten, öffnen Sie \"Systemeinstellungen / Apps / Delta Chat\" und aktivieren Sie \"Benachrichtigungen\". Zeichne zum Verwischen in beliebige Bereiche diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 0c5b130e6..7a33f8723 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -865,8 +865,6 @@ Όνομα και μήνυμα Μόνο όνομα Χωρίς όνομα ή μήνυμα - - Χρειάζονται δικαιώματα πρόσβασης Συνέχεια @@ -874,7 +872,6 @@ Για να στείλετε μηνύματα ήχου, μεταβείτε στις ρυθμίσεις της εφαρμογής, επιλέξτε \"Άδειες\" και ενεργοποιήστε το \"Μικρόφωνο\". Για να λάβετε ή να στείλετε αρχεία, μεταβείτε στις ρυθμίσεις της εφαρμογής, επιλέξτε \"Άδειες\" και ενεργοποιήστε την \"Αποθήκευση\". Για να επισυνάψετε μια τοποθεσία, μεταβείτε στις ρυθμίσεις της εφαρμογής, επιλέξτε \"Άδειες\" και ενεργοποιήστε την \"Τοποθεσία\". - Ζωγράφισε οπουδήποτε για να θολώσεις Σύνταξη κειμένου diff --git a/res/values-eo/strings.xml b/res/values-eo/strings.xml index 0bea5dd58..b8b56360b 100644 --- a/res/values-eo/strings.xml +++ b/res/values-eo/strings.xml @@ -464,8 +464,6 @@ Nomon kaj mesaĝon Nur nomon Nek nomon aŭ mesaĝon - - Permeso bezonata Daŭrigi diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index d5ebeb0a2..f4a75d18d 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -931,8 +931,6 @@ Nombre y mensaje Solo nombre Sin nombre ni mensaje - - Permiso requerido Continuar @@ -940,7 +938,6 @@ Para enviar mensajes de audio, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Micrófono\". Para adjuntar o exportar fotos, videos o audio, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Almacenamiento\". Para adjuntar una ubicación, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Ubicación\". - Dibuja para difuminar Añadir texto diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml index 689537915..6a26d9a81 100644 --- a/res/values-eu/strings.xml +++ b/res/values-eu/strings.xml @@ -502,8 +502,6 @@ Kideak beste kide batzuek egiatzen dituzte bigarren faktore batekin eta mezuak b Izena eta mezua Izena besterik ez Izenik edo mezurik ez - - Baimena behar da Jarraitu @@ -511,7 +509,6 @@ Kideak beste kide batzuek egiatzen dituzte bigarren faktore batekin eta mezuak b Delta Chat-ek mikrofonoa erabiltzeko baimena behar du ahots-mezuak bidali ahal izateko, baina behin betiko ukatu zaio. Joan aplikazioaren ezarpenetara, hautatu \"Baimenak\" eta gaitu \"Mikrofonoa\". Delta Chat-ek biltegiratze baimena behar du argazkiak, bideoak edo audioa erantsi edo esportatzeko, baina behin betiko ukatu zaio. Joan aplikazioaren ezarpen menura, hautatu \"baimenak\", eta gaitu \"Biltegiratzea\" Delta Chat-ek kokaleku aatzitzeko baimena behar du kokalekua eransteko, baina behin betiko ukatu zaio. Joan aplikazioaren ezarpen menura, hautatu \"baimenak\", eta gaitu \"Kokalekua\". - Zifratutako mezua diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index c4f9c0644..d70085a2b 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -926,8 +926,6 @@ https://meet.jit.si/$ROOM نام و پیام فقط نام بدون نام یا پیام - - مجوز لازم است ادامه @@ -949,7 +947,6 @@ https://meet.jit.si/$ROOM گزینه \"Location\" را فعال نمایید. - هر کجا مایلید شروع به رسم کردن کنید تا مات شود. افزودن متن diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 523581d07..8a1413416 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -865,8 +865,6 @@ Nimi ja viesti Pelkkä nimi Ei nimeä eikä viestiä - - Pääsylupa vaaditaan Jatka @@ -874,7 +872,6 @@ Lähettääksesi ääniviestin mene sovelluksen asetuksiin, valitse \"Käyttöluvat\" ja kytke päälle \"Mikrofoni\". Lähettääksesi tai vastaanottaaksesi tiedostoja mene sovelluksen asetuksiin, valitse \"Käyttöluvat\" ja kytke päälle \"Tallennustila\". Jakaaksesi sijaintisi mene sovelluksen asetuksiin, valitse \"Käyttöluvat\" ja kytke päälle \"Sijainti\". - Piirrää sumentaaksesi Lisää teksti diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index d838cd062..261690b5d 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -928,8 +928,6 @@ Nom et message Nom seulement Pas de nom ou de message - - Autorisation requise Continuez @@ -937,7 +935,6 @@ Pour envoyer des messages audio, aller dans les paramètres de l\'application, sélectionner \"Autorisations\" et autoriser \"Microphone\". Pour recevoir ou envoyer des fichiers, aller dans les Paramètres de l\'application, sélectionner \"Autorisations\" et autoriser \"Stockage\". Pour joindre une position, aller au menu paramètres de l\'application, sélectionnez \"Autorisations\" et activez \"Position\". - Dessinez n\'importe où pour flouter Ajouter du texte diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index 8d2da65ee..e627fc5d8 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -834,8 +834,6 @@ Nome e mensaxe Só nome Sen nome ou mensaxe - - Permiso requerido Continuar @@ -843,7 +841,6 @@ Para enviar mensaxes de voz, vaite aos axustes da app, escolle \"Permisos\" e activa \"Micrófono\". Para recibir ou enviar ficheiros, vaite aos axustes da app, escolle \"Permisos\" e activa \"Almacenaxe\". Para engadir a localización, vaite aos axustes da app, escolle \"Permisos\" e activa \"Localización\". - Debuxa para esborranchar Engadir texto diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index 78b6822cc..ee16fb444 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -231,8 +231,6 @@ Ime i poruka Samo ime Bez imena ili poruke - - Potrebna je dozvola Nastavi diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 321903ab9..7127c2902 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -283,8 +283,6 @@ Név és üzenet Csak név Se név, se üzenet - - Engedély szükséges Folytatás diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 03c0815d5..7d2e89fed 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -627,8 +627,6 @@ Nama dan pesan Hanya nama Tidak ada nama atau pesan - - Perlu izin Lanjutkan @@ -636,7 +634,6 @@ Untuk mengirim pesan audio, lihat pengaturan aplikasi, pilih \"Perizinan\", dan aktifkan \"Mikrofon\". Untuk menerima atau mengirim berkas, pergi ke pengaturan aplikasi, pilih \"Perizinan\", dan fungsikan \"Penyimpanan\". Untuk melampirkan lokasi, lihat pengaturan aplikasi, pilih \"Perizinan\", dan aktifkan \"Lokasi\". - Gambar di mana saja untuk diburamkan diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index b33461c37..e92ecf970 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -931,8 +931,6 @@ Nome e messaggio Solo nome Nessun nome nè messaggio - - Autorizzazione richiesta Continua @@ -940,7 +938,6 @@ Delta Chat richiede l\'autorizzazione inviare messaggi audio, ma è stata bloccata permanentemente. Vai nelle impostazioni delle App, seleziona \"Autorizzazioni\" e abilita \"Microfono\". Per ricevere o inviare files, vai alle impostazioni dell\'app, seleziona \"Autorizzazioni\" e abilita \"Archiviazione\". Delta Chat richiede l\'autorizzazione per allegare la posizione, ma è stata bloccata permanentemente. Vai nelle impostazioni delle App, seleziona \"Autorizzazioni\" e abilita \"Posizione\". - Disegna ovunque per sfocare Aggiungi Testo diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 07b9f5a83..8721a2254 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -652,8 +652,6 @@ https://delta.chat 名前とメッセージ 名前のみ 名前もメッセージも非表示 - - アクセス許可が必要です 続行 diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml index e0293071c..25ca7ce9c 100644 --- a/res/values-km/strings.xml +++ b/res/values-km/strings.xml @@ -780,8 +780,6 @@ ឈ្មោះ និងសារ តែឈ្មោះ មិនឈ្មោះ ឬសារ - - ត្រូវបានការអនុញ្ញាត បន្ត @@ -789,7 +787,6 @@ ដើម្បីផ្ញើ សារសំឡេង ចូលទៅកាន់ការកំណត់កម្មវិធី ជ្រើសរើស \"ការអនុញ្ញាត\" និងបើកដំណើរការ \"មីក្រូហ្វូន\"។ ដើម្បីទទួល រឺផ្ញើឯកសារ ចូលទៅកាន់ការកំណត់កម្មវិធី ជ្រើសរើស \"ការអនុញ្ញាត\" និងបើកដំណើរការ \"ការផ្ទុក\"។ ដើម្បីភ្ជាប់ទីតាំង ចូលទៅកាន់ការកំណត់កម្មវិធី ជ្រើសរើស\"ការកំណត់\" និងបើកដំណើរការ \"ទីតាំង\"។ - គូកន្លែងណាដើម្បីឲ្យព្រិលៗ បន្ថែមអក្សរ diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index cb0f408f7..32358a80a 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -826,8 +826,6 @@ 이름과 메시지 이름만 이름이나 메시지 표시하지 않음 - - 권한 필요 계속 @@ -835,7 +833,6 @@ 오디오 메시지를 보내려면 앱 설정으로 이동하여 \"권한\"을 선택하고 \"마이크\"를 활성화하십시오. 파일을 수신하거나 보내려면 앱 설정으로 이동하여 \"사용 권한\"을 선택하고 \"스토리지\"를 활성화하십시오. 위치를 첨부하려면 앱 설정으로 이동하여 \"권한\"을 선택하고 \"위치\"를 활성화하십시오. - 흐릿하게 보이게 하려면 아무 데나 그리시오 텍스트 추가 diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index 343e016ed..f0e7bc733 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -693,8 +693,6 @@ Vardą ir žinutę Tik vardą Jokio vardo ar žinutės - - Reikalingas leidimas Tęsti diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 6bb37f44d..b2a820442 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -417,8 +417,6 @@ Navn og melding Bare navn Ingen navn eller melding - - Tillatelse kreves Fortsett diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index feb56f85f..97303a666 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -916,8 +916,6 @@ Naam en bericht Alleen naam Geen naam of bericht - - Machtiging vereist Doorgaan @@ -925,7 +923,6 @@ Delta Chat wil spraakberichten versturen. Ga naar de app-instellingen, kies ‘Rechten’ en schakel ‘Microfoon’ in. Delta Chat wil bestanden kunnen ontvangen en versturen. Ga naar de app-instellingen, kies ‘Rechten’ en schakel ‘Opslag’ in. Delta Chat wil je locatie kunnen delen. Ga naar de app-instellingen, kies ‘Rechten’ en schakel ‘Locatie’ in. - Teken met je vinger om vervaging toe te passen Tekst toevoegen diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 275696e72..6eff585cc 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -943,8 +943,6 @@ Nazwa i wiadomość Tylko nazwa Brak nazwy lub wiadomości - - Wymagane zezwolenie Kontynuuj @@ -952,7 +950,6 @@ Delta Chat wymaga zezwolenia użycia mikrofonu, aby wysyłać wiadomości audio, ale zostało ono trwale odrzucone. Przejdź do ustawień aplikacji, wybierz „Uprawnienia” i włącz „Mikrofon”. Delta Chat wymaga uprawnienia do przechowywania, aby dołączyć lub wyeksportować zdjęcia, filmy lub dźwięk, ale zostało ono trwale odrzucone. Przejdź do menu ustawień aplikacji, wybierz „Uprawnienia” i włącz „Pamięć”. Delta Chat wymaga zezwolenia na lokalizację, aby dołączyć lokalizację, ale zostało ono trwale odrzucone. Przejdź do menu ustawień aplikacji, wybierz „Uprawnienia” i włącz „Lokalizacja”. - Rysuj gdziekolwiek, aby rozmyć Dodaj tekst diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 1e60b3f3f..d1ac9f47d 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -927,8 +927,6 @@ Nome e mensagem Somente o nome Sem nome ou mensagem - - Permissão necessária Continuar @@ -936,7 +934,6 @@ O Delta Chat precisa acessar seu microfone para que você possa enviar mensagens de voz, mas o acesso foi negado. Por favor, habilite o microfone nas configurações de permissões do aplicativo. Para receber o enviar arquivos, vai nas configurações do aplicativo, escolhe \"Permissões\", e ativar \"Armazenamento\". O Delta Chat precisa acessar sua localização para que você possa enviá-la, mas o acesso foi negado. Por favor, habilite o seu acesso nas configurações de permissões do aplicativo. - Desenhe em qualquer lugar para desfocar Adicionar texto diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 76e79ee4a..9d7393ce1 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -375,8 +375,6 @@ Nome e mensagem Apenas nome Sem nome ou mensagem - - Permissão necessária Continuar @@ -384,7 +382,6 @@ O Delta Chat necessita de permissão de acesso ao microfone para enviar mensagens de áudio, mas foi negado. Por favor, continue com as configurações do aplicativo, selecione \"Permissões\" e active \"Microfone\". O Delta Chat necessita da permissão de armazenamento para anexar ou exportar fotos, vídeos ou áudio, mas foi negado. Por favor, continue no menu de configurações do aplicativo, seleccione \"Permissões\" e active \"Armazenamento\". O Delta Chat necessita permissão de acesso à localização para anexar um local, mas ele negado. Por favor, continue no menu de configurações do aplicativo, selecione \"Permissões \"e ative \"Localização\". - Mensagem encriptada diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index b33e70bd7..1e8dd2955 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -943,8 +943,6 @@ Имя и сообщение Только имя Без имени или сообщения - - Требуется разрешение Продолжить @@ -952,7 +950,6 @@ Для отправки аудио сообщений приложению Delta Chat нужно разрешение использовать микрофон, но сейчас микрофон заблокирован. Перейдите в меню настроек приложения, выберите \"Разрешения приложений\" и включите \"Микрофон\". Для вложения или экспорта фотографий, видео или аудио файлов в Delta Chat требуется доступ к памяти устройства, однако в этом разрешении было отказано навсегда. Перейдите в меню настроек приложения, выберите \"Разрешения приложений\" и включите \"Память\". Чтобы передать местоположение приложению Delta Chat нужно разрешить доступ к нему, но сейчас он заблокирован. Перейдите в меню настроек приложения, выберите \"Разрешения приложений\" и включите \"Местоположение\". - Рисуйте, чтобы размывать Добавить текст diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index b64c6d840..69ac06f2e 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -889,8 +889,6 @@ Meno a správa Iba meno Žiadne meno ani správa - - Vyžaduje sa povolenie ďalej @@ -898,7 +896,6 @@ Ak chcete odosielať zvukové správy, prejdite do nastavení aplikácie, vyberte možnosť „Povolenia“ a povoľte možnosť „Mikrofón“. Ak chcete prijímať alebo odosielať súbory, prejdite do nastavení aplikácie, vyberte možnosť „Povolenia“ a povoľte možnosť „Úložisko“. Ak chcete pripojiť miesto, prejdite do nastavení aplikácie, vyberte možnosť Povolenia a povoľte možnosť Poloha. - Ak chcete rozmazať, nakreslite kamkoľvek Pridať text diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index 40ec2489d..c06b03a8a 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -913,8 +913,6 @@ Emër dhe mesazh Vetëm emër Pa emër apo mesazh - - Lypset leje Vazhdo @@ -922,7 +920,6 @@ Delta Chat lyp leje mbi Mikrofonin që të mund të dërgojë mesazhe audio, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Mikrofonin\". Delta Chat lyp leje mbi Depozitimin që të mund të bashkëngjisë apo eksportojë foto, video ose audio, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Depozitimin\". Delta Chat lyp leje mbi Vendndodhjen që të mund të bashkëngjisë një vendndodhje, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Vendndodhjen\". - Që të turbullohet, vizatoni kudo qoftë Shtoni tekst diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index d996c69f4..dc8b59959 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -894,8 +894,6 @@ Име и поруку Само име Ни име ни поруку - - Дозвола је потребна Настави @@ -903,7 +901,6 @@ Да бисте послали звучне записе, идите на подешавања апликације, изаберите „Дозволе“ и омогућите „Микрофон“. Да бисте примали или слали датотеке, идите на подешавања апликације, изаберите „Дозволе“ и омогућите „Складиштење“. Да приложите положај, идите у подешавања апликације и изаберите „Дозволе“ и омогућите „Положај/Локацију“. - Цртајте било где да би сте замутили Додај текст diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 5ef1a8c15..5c726142c 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -628,8 +628,6 @@ Namn och meddelande Endast namn Inget namn eller meddelande - - Behörighet krävs Fortsätt @@ -637,7 +635,6 @@ Gå till programinställningarna och aktivera \"Mikrofon\" under \"Behörighet\", för att skicka röstmeddelanden. Gå till programinställningarna och aktivera \"Lagring\" under \"Behörighet\", för att ta emot eller skicka filer. Gå till programinställningarna och aktivera \"Plats\" under \"Behörighet\", för att bifoga en plats. - Rita var som helst för att smeta ut diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml index 4b2887a4b..69252319e 100644 --- a/res/values-ta/strings.xml +++ b/res/values-ta/strings.xml @@ -230,8 +230,6 @@ பெயரும் செய்தியும் பெயர் மட்டும் பெயர் அல்லது செய்தி இல்லை - - அனுமதி தேவை தொடர் diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml index 2e641b37a..a3accf10b 100644 --- a/res/values-te/strings.xml +++ b/res/values-te/strings.xml @@ -197,8 +197,6 @@ పేరు మరియు సందేశం పేరు మాత్రమే పేరు లేదా సందేశం - - అనుమతి అవసరం కొనసాగించు diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 7f2ec9b14..f96df5046 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -916,8 +916,6 @@ Ad ve ileti Yalnızca ad Ad ya da ileti yok - - İzin gerekli Sürdür @@ -925,7 +923,6 @@ Sesli iletiler göndermek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Mikrofon\"u etkinleştirin. Dosyalar almak ya da göndermek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Depolama\"yı etkinleştirin. Bir konum iliştirmek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Konum\"u etkinleştirin. - Bulanıklaştırmak için herhangi bir yere çizin Metin Ekle diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index d26fcff9e..7629dc1ac 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -943,8 +943,6 @@ Ім\'я та повідомлення Тільки ім\'я Без імені або повідомлення - - Потрібен дозвіл Продовжити @@ -952,7 +950,6 @@ Для надсилання голосових повідомлень додатку потрібен дозвіл на використання мікрофону, але зараз його не надано. Для надання дозволу перейдіть у системне меню налаштувань, у розділі «Додатки» знайдіть Delta Chat і дозвольте доступ до мікрофону. Для збереження або передавання фотографій перейдіть до налаштувань додатку, оберіть \"Дозволи\" та включіть \"Сховище\" Щоб передати місцезнаходження, додатку потрібен доступ до геоданих пристрою, але зараз його не надано. Для надання доступу перейдіть у системне меню налаштувань, у розділі «Додатки» знайдіть Delta Chat, виберіть пункт «Права доступу» і дозвольте доступ до місцезнаходження пристрою. - Малюйте де завгодно для розмиття Додати текст diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 17dfed712..9782aeb98 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -901,8 +901,6 @@ 名称和消息 仅名称 不显示名称或消息 - - 需要权限 继续 @@ -910,7 +908,6 @@ 要发送音频消息,请转至应用设置,选择“权限”,然后启用“麦克风”。 要发送或接收文件,请转至应用设置,选择“权限”,然后启用“存储”。 要附加位置,请转至应用设置,选择“权限”,然后启用“位置”。 - 对任意地方涂抹以进行模糊 添加文字 From 681c7294cc9a2842a880055b743495e266625d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Tue, 3 Oct 2023 18:13:36 -0400 Subject: [PATCH 124/169] Update src/org/thoughtcrime/securesms/ConversationItem.java Co-authored-by: bjoern --- src/org/thoughtcrime/securesms/ConversationItem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index b8a65ca06..2e7b5089a 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -194,7 +194,9 @@ public class ConversationItem extends BaseConversationItem setReactions(messageRecord); setFooter(messageRecord, locale); setQuote(messageRecord); - if (Util.isTouchExplorationEnabled(context)) setContentDescription(); + if (Util.isTouchExplorationEnabled(context)) { + setContentDescription(); + } } From a7296c74653eac9429c454167e7eb68c6c727f28 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 00:27:23 +0200 Subject: [PATCH 125/169] reuse `ACCESSIBILITY_SERVICE` object as `isTouchExplorationEnabled()` is called more often now, this avoids tens of calls per chat view. /me also wanted to commit to the good-last-issue pr :) --- src/org/thoughtcrime/securesms/util/Util.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/util/Util.java b/src/org/thoughtcrime/securesms/util/Util.java index 6fc9471fe..463e452d8 100644 --- a/src/org/thoughtcrime/securesms/util/Util.java +++ b/src/org/thoughtcrime/securesms/util/Util.java @@ -38,6 +38,7 @@ import android.view.accessibility.AccessibilityManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.components.ComposeText; @@ -346,9 +347,14 @@ public class Util { return false; } + private static AccessibilityManager accessibilityManager; public static boolean isTouchExplorationEnabled(Context context) { try { - return ((AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE)).isTouchExplorationEnabled(); + if (accessibilityManager == null) { + Context applicationContext = context.getApplicationContext(); + accessibilityManager = ((AccessibilityManager) applicationContext.getSystemService(Context.ACCESSIBILITY_SERVICE)); + } + return accessibilityManager.isTouchExplorationEnabled(); } catch (Exception e) { return false; } From ce1733f3eaac15498d3e20cd5f0cfba860bebed5 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 03:28:21 +0200 Subject: [PATCH 126/169] fix displaying of sticker's footer --- res/layout/conversation_item_received.xml | 20 +------------------ res/layout/conversation_item_sent.xml | 20 +------------------ res/layout/conversation_item_sent_sticker.xml | 7 ------- ...cker.xml => conversation_item_sticker.xml} | 0 res/layout/sticker_view.xml | 13 ++++++++++++ .../securesms/ConversationItem.java | 11 +++------- .../components/BorderlessImageView.java | 10 ++++++++++ 7 files changed, 28 insertions(+), 53 deletions(-) delete mode 100644 res/layout/conversation_item_sent_sticker.xml rename res/layout/{conversation_item_received_sticker.xml => conversation_item_sticker.xml} (100%) diff --git a/res/layout/conversation_item_received.xml b/res/layout/conversation_item_received.xml index 00a2706b9..5c9e8ad78 100644 --- a/res/layout/conversation_item_received.xml +++ b/res/layout/conversation_item_received.xml @@ -122,7 +122,7 @@ android:id="@+id/sticker_view_stub" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout="@layout/conversation_item_received_sticker" /> + android:layout="@layout/conversation_item_sticker" /> - - + android:layout="@layout/conversation_item_sticker" /> - - - diff --git a/res/layout/conversation_item_received_sticker.xml b/res/layout/conversation_item_sticker.xml similarity index 100% rename from res/layout/conversation_item_received_sticker.xml rename to res/layout/conversation_item_sticker.xml diff --git a/res/layout/sticker_view.xml b/res/layout/sticker_view.xml index 37976599e..d82561430 100644 --- a/res/layout/sticker_view.xml +++ b/res/layout/sticker_view.xml @@ -23,4 +23,17 @@ app:minHeight="@dimen/media_bubble_min_height" app:maxHeight="@dimen/media_bubble_max_height" /> + + diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index 2e7b5089a..8ab6b2bee 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -100,7 +100,6 @@ public class ConversationItem extends BaseConversationItem protected View replyView; @Nullable private QuoteView quoteView; private ConversationItemFooter footer; - private ConversationItemFooter stickerFooter; private ReactionsConversationView reactionsView; private TextView groupSender; private View groupSenderHolder; @@ -138,7 +137,6 @@ public class ConversationItem extends BaseConversationItem this.bodyText = findViewById(R.id.conversation_item_body); this.footer = findViewById(R.id.conversation_item_footer); - this.stickerFooter = findViewById(R.id.conversation_item_sticker_footer); this.reactionsView = findViewById(R.id.reactions_view); this.groupSender = findViewById(R.id.group_message_sender); this.contactPhoto = findViewById(R.id.contact_photo); @@ -324,7 +322,7 @@ public class ConversationItem extends BaseConversationItem } else if (mediaThumbnailStub.resolved() && mediaThumbnailStub.get().getVisibility() == View.VISIBLE) { desc += mediaThumbnailStub.get().getDescription() + "\n"; } else if (stickerStub.resolved() && stickerStub.get().getVisibility() == View.VISIBLE) { - desc += context.getString(R.string.sticker) + "\n"; + desc += stickerStub.get().getDescription() + "\n"; } if (bodyText.getVisibility() == View.VISIBLE) { @@ -332,9 +330,7 @@ public class ConversationItem extends BaseConversationItem } if (footer.getVisibility() == View.VISIBLE) { - desc += footer.getDescription() + "\n"; - } else if (stickerFooter.getVisibility() == View.VISIBLE) { - desc += stickerFooter.getDescription() + "\n"; + desc += footer.getDescription(); } this.setContentDescription(desc); @@ -714,7 +710,6 @@ public class ConversationItem extends BaseConversationItem ViewUtil.updateLayoutParams(footer, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); footer.setVisibility(GONE); - stickerFooter.setVisibility(GONE); if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().getFooter().setVisibility(GONE); ConversationItemFooter activeFooter = getActiveFooter(current); @@ -744,7 +739,7 @@ public class ConversationItem extends BaseConversationItem private ConversationItemFooter getActiveFooter(@NonNull DcMsg messageRecord) { if (hasSticker(messageRecord)) { - return stickerFooter; + return stickerStub.get().getFooter(); } else if (hasOnlyThumbnail(messageRecord) && TextUtils.isEmpty(messageRecord.getText())) { return mediaThumbnailStub.get().getFooter(); } else { diff --git a/src/org/thoughtcrime/securesms/components/BorderlessImageView.java b/src/org/thoughtcrime/securesms/components/BorderlessImageView.java index d4b2af102..4d134588d 100644 --- a/src/org/thoughtcrime/securesms/components/BorderlessImageView.java +++ b/src/org/thoughtcrime/securesms/components/BorderlessImageView.java @@ -18,6 +18,7 @@ public class BorderlessImageView extends FrameLayout { private ThumbnailView image; private View missingShade; + private ConversationItemFooter footer; public BorderlessImageView(@NonNull Context context) { super(context); @@ -34,6 +35,7 @@ public class BorderlessImageView extends FrameLayout { this.image = findViewById(R.id.sticker_thumbnail); this.missingShade = findViewById(R.id.sticker_missing_shade); + this.footer = findViewById(R.id.sticker_footer); } @Override @@ -65,6 +67,14 @@ public class BorderlessImageView extends FrameLayout { missingShade.setVisibility(showControls ? View.VISIBLE : View.GONE); } + public String getDescription() { + return getContext().getString(R.string.sticker) + "\n" + footer.getDescription(); + } + + public ConversationItemFooter getFooter() { + return footer; + } + public void setThumbnailClickListener(@NonNull SlideClickListener listener) { image.setThumbnailClickListener(listener); } From 408df46643ed454a2fb9205313258775cd93d963 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 03:52:20 +0200 Subject: [PATCH 127/169] check if thumbnail's footer is visible in getDescription() --- .../securesms/components/ConversationItemThumbnail.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java b/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java index 1f8fd8337..2372b9e2c 100644 --- a/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java +++ b/src/org/thoughtcrime/securesms/components/ConversationItemThumbnail.java @@ -7,6 +7,7 @@ import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.util.AttributeSet; +import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; @@ -87,7 +88,11 @@ public class ConversationItemThumbnail extends FrameLayout { } public String getDescription() { - return thumbnail.getDescription() + "\n" + footer.getDescription(); + String desc = thumbnail.getDescription(); + if (footer.getVisibility() == View.VISIBLE) { + desc += "\n" + footer.getDescription(); + } + return desc; } @Override From 5e5a1ec6c59531109d18a2e95b9ee945d58cf109 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 04:50:14 +0200 Subject: [PATCH 128/169] allow to resend attachments from chat profile --- res/menu/profile_context.xml | 4 ++++ .../securesms/ConversationFragment.java | 14 -------------- .../securesms/MessageSelectorFragment.java | 15 +++++++++++++++ .../securesms/ProfileDocumentsFragment.java | 12 ++++++++++++ .../securesms/ProfileGalleryFragment.java | 12 ++++++++++++ .../securesms/ProfileSettingsFragment.java | 1 + 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/res/menu/profile_context.xml b/res/menu/profile_context.xml index 8c3b3ec5e..408771636 100644 --- a/res/menu/profile_context.xml +++ b/res/menu/profile_context.xml @@ -27,4 +27,8 @@ + + diff --git a/src/org/thoughtcrime/securesms/ConversationFragment.java b/src/org/thoughtcrime/securesms/ConversationFragment.java index ab1e47415..96db5476d 100644 --- a/src/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationFragment.java @@ -478,20 +478,6 @@ public class ConversationFragment extends MessageSelectorFragment } } - private void handleResendMessage(final Set dcMsgsSet) { - int[] ids = DcMsg.msgSetToIds(dcMsgsSet); - if (dcContext.resendMsgs(ids)) { - actionMode.finish(); - Toast.makeText(getContext(), R.string.sending, Toast.LENGTH_SHORT).show(); - } else { - new AlertDialog.Builder(getContext()) - .setMessage(dcContext.getLastError()) - .setCancelable(false) - .setPositiveButton(android.R.string.ok, null) - .show(); - } - } - private void reloadList() { reloadList(false); } diff --git a/src/org/thoughtcrime/securesms/MessageSelectorFragment.java b/src/org/thoughtcrime/securesms/MessageSelectorFragment.java index e3ce36c9c..3451ceb05 100644 --- a/src/org/thoughtcrime/securesms/MessageSelectorFragment.java +++ b/src/org/thoughtcrime/securesms/MessageSelectorFragment.java @@ -7,6 +7,7 @@ import android.os.AsyncTask; import android.view.Menu; import android.view.View; import android.widget.TextView; +import android.widget.Toast; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.view.ActionMode; @@ -115,4 +116,18 @@ public abstract class MessageSelectorFragment protected void handleShare(final DcMsg dcMsg) { DcHelper.openForViewOrShare(getContext(), dcMsg.getId(), Intent.ACTION_SEND); } + + protected void handleResendMessage(final Set dcMsgsSet) { + int[] ids = DcMsg.msgSetToIds(dcMsgsSet); + if (dcContext.resendMsgs(ids)) { + actionMode.finish(); + Toast.makeText(getContext(), R.string.sending, Toast.LENGTH_SHORT).show(); + } else { + new AlertDialog.Builder(getContext()) + .setMessage(dcContext.getLastError()) + .setCancelable(false) + .setPositiveButton(android.R.string.ok, null) + .show(); + } + } } diff --git a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java index d9c405061..12eb90ab4 100644 --- a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java @@ -204,6 +204,15 @@ public class ProfileDocumentsFragment menu.findItem(R.id.show_in_chat).setVisible(singleSelection); menu.findItem(R.id.share).setVisible(singleSelection); + boolean canResend = true; + for (DcMsg messageRecord : messageRecords) { + if (!messageRecord.isOutgoing()) { + canResend = false; + break; + } + } + menu.findItem(R.id.menu_resend).setVisible(canResend); + boolean webxdcApp = singleSelection && messageRecords.iterator().next().getType() == DcMsg.DC_MSG_WEBXDC; menu.findItem(R.id.menu_add_to_home_screen).setVisible(webxdcApp); } @@ -259,6 +268,9 @@ public class ProfileDocumentsFragment case R.id.save: handleSaveAttachment(getListAdapter().getSelectedMedia()); return true; + case R.id.menu_resend: + handleResendMessage(getListAdapter().getSelectedMedia()); + return true; } return false; } diff --git a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java index cf4c15884..8118f572b 100644 --- a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java @@ -197,6 +197,15 @@ public class ProfileGalleryFragment menu.findItem(R.id.details).setVisible(singleSelection); menu.findItem(R.id.show_in_chat).setVisible(singleSelection); menu.findItem(R.id.share).setVisible(singleSelection); + + boolean canResend = true; + for (DcMsg messageRecord : messageRecords) { + if (!messageRecord.isOutgoing()) { + canResend = false; + break; + } + } + menu.findItem(R.id.menu_resend).setVisible(canResend); } private ProfileGalleryAdapter getListAdapter() { @@ -246,6 +255,9 @@ public class ProfileGalleryFragment case R.id.save: handleSaveAttachment(getListAdapter().getSelectedMedia()); return true; + case R.id.menu_resend: + handleResendMessage(getListAdapter().getSelectedMedia()); + return true; } return false; } diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java index 43b726f3e..553cfab71 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java @@ -271,6 +271,7 @@ public class ProfileSettingsFragment extends Fragment menu.findItem(R.id.show_in_chat).setVisible(false); menu.findItem(R.id.save).setVisible(false); menu.findItem(R.id.share).setVisible(false); + menu.findItem(R.id.menu_resend).setVisible(false); mode.setTitle("1"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { From c4930309f3b3daa766b5f3d07bb8d7271a42bddd Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 13:53:14 +0200 Subject: [PATCH 129/169] use DynamicNoActionBarTheme in ScribbleActivity --- .../thoughtcrime/securesms/scribbles/ScribbleActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java b/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java index e3817957c..de0af535c 100644 --- a/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java +++ b/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java @@ -4,12 +4,19 @@ import android.os.Bundle; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; import org.thoughtcrime.securesms.R; +import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme; public class ScribbleActivity extends PassphraseRequiredActionBarActivity { public static final int SCRIBBLE_REQUEST_CODE = 31424; public static final String CROP_AVATAR = "crop_avatar"; ImageEditorFragment imageEditorFragment; + @Override + protected void onPreCreate() { + dynamicTheme = new DynamicNoActionBarTheme(); + super.onPreCreate(); + } + @Override protected void onCreate(Bundle savedInstanceState, boolean ready) { setContentView(R.layout.scribble_activity); From 4eda9a009101fd08f1695b184083ff8e4e6eb761 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 14:31:12 +0200 Subject: [PATCH 130/169] switch account if needed when opening webxdc app from home shortcut --- src/org/thoughtcrime/securesms/WebxdcActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index 66137fb74..dd0db90af 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -38,6 +38,7 @@ import com.b44t.messenger.DcEvent; import com.b44t.messenger.DcMsg; import org.json.JSONObject; +import org.thoughtcrime.securesms.connect.AccountManager; import org.thoughtcrime.securesms.connect.DcEventCenter; import org.thoughtcrime.securesms.connect.DcHelper; import org.thoughtcrime.securesms.util.JsonUtils; @@ -130,11 +131,11 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE Bundle b = getIntent().getExtras(); int appMessageId = b.getInt("appMessageId"); + int accountId = b.getInt("accountId"); this.dcContext = DcHelper.getContext(getApplicationContext()); - if (dcContext.getAccountId() != b.getInt("accountId")) { - Toast.makeText(this, "Switch to belonging account first.", Toast.LENGTH_LONG).show(); - finish(); - return; + if (accountId != dcContext.getAccountId()) { + AccountManager.getInstance().switchAccount(getApplicationContext(), accountId); + this.dcContext = DcHelper.getContext(getApplicationContext()); } this.dcAppMsg = this.dcContext.getMsg(appMessageId); From 512299a1d9213a5dfca511bc503313484a253b02 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 15:04:02 +0200 Subject: [PATCH 131/169] properly display webxdc's loading screen in dark mode --- res/raw/webxdc_wrapper.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/raw/webxdc_wrapper.html b/res/raw/webxdc_wrapper.html index c0ce221fa..9dd7898c6 100644 --- a/res/raw/webxdc_wrapper.html +++ b/res/raw/webxdc_wrapper.html @@ -15,6 +15,7 @@ position: relative; } .iframe-container iframe { + display: none; border: 0; height: 100%; left: 0; @@ -129,6 +130,7 @@ "Error: was not able to block webrtc ERROR_C"; } else { loadingDiv.innerHTML = ""; + iframe.style.display = 'block'; iframe.src = "index.html"; } } From 6bd0b972579e364605f5d155e895633a73bf3b3e Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 15:38:56 +0200 Subject: [PATCH 132/169] save map preferences per account, not only per chat id --- .../securesms/map/MapActivity.java | 9 +++++---- .../securesms/map/MapDataManager.java | 4 ++++ .../thoughtcrime/securesms/util/Prefs.java | 20 +++++++++---------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/org/thoughtcrime/securesms/map/MapActivity.java b/src/org/thoughtcrime/securesms/map/MapActivity.java index 3ec93678d..889d4ebce 100644 --- a/src/org/thoughtcrime/securesms/map/MapActivity.java +++ b/src/org/thoughtcrime/securesms/map/MapActivity.java @@ -120,9 +120,10 @@ public class MapActivity extends BaseActivity implements Observer, inputAwareContainer.addOnKeyboardHiddenListener(this); inputAwareContainer.addOnKeyboardShownListener(this); - final LatLng lastMapCenter = Prefs.getMapCenter(this.getApplicationContext(), chatId); + final int accountId = DcHelper.getContext(this.getApplicationContext()).getAccountId(); + final LatLng lastMapCenter = Prefs.getMapCenter(this.getApplicationContext(), accountId, chatId); if (lastMapCenter != null) { - double lastZoom = Prefs.getMapZoom(this.getApplicationContext(), chatId); + double lastZoom = Prefs.getMapZoom(this.getApplicationContext(), accountId, chatId); mapboxMap.setCameraPosition(new CameraPosition.Builder() .target(lastMapCenter) .zoom(lastZoom) @@ -215,8 +216,8 @@ public class MapActivity extends BaseActivity implements Observer, protected void onDestroy() { super.onDestroy(); if (mapDataManager != null) { - Prefs.setMapCenter(this.getApplicationContext(), mapDataManager.getChatId(), mapboxMap.getCameraPosition().target); - Prefs.setMapZoom(this.getApplicationContext(), mapDataManager.getChatId(), mapboxMap.getCameraPosition().zoom); + Prefs.setMapCenter(this.getApplicationContext(), mapDataManager.getAccountId(), mapDataManager.getChatId(), mapboxMap.getCameraPosition().target); + Prefs.setMapZoom(this.getApplicationContext(), mapDataManager.getAccountId(), mapDataManager.getChatId(), mapboxMap.getCameraPosition().zoom); mapDataManager.onDestroy(); } if (markerViewManager != null) { diff --git a/src/org/thoughtcrime/securesms/map/MapDataManager.java b/src/org/thoughtcrime/securesms/map/MapDataManager.java index 39df85a96..c12d20ad7 100644 --- a/src/org/thoughtcrime/securesms/map/MapDataManager.java +++ b/src/org/thoughtcrime/securesms/map/MapDataManager.java @@ -343,6 +343,10 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, return chatId; } + public int getAccountId() { + return dcContext.getAccountId(); + } + private void showLineLayer(MapSource source) { LineLayer lineLayer = (LineLayer) mapboxStyle.getLayer(source.getLineLayer()); if (lineLayer != null) { diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index c127de055..1ee7deb98 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -281,26 +281,26 @@ public class Prefs { // map - public static void setMapCenter(Context context, int chatId, LatLng latLng) { - setLongPreference(context, MAP_CENTER_LATITUDE+chatId, Double.doubleToRawLongBits(latLng.getLatitude())); - setLongPreference(context, MAP_CENTER_LONGITUDE+chatId, Double.doubleToRawLongBits(latLng.getLongitude())); + public static void setMapCenter(Context context, int accountId, int chatId, LatLng latLng) { + setLongPreference(context, MAP_CENTER_LATITUDE+accountId+"."+chatId, Double.doubleToRawLongBits(latLng.getLatitude())); + setLongPreference(context, MAP_CENTER_LONGITUDE+accountId+"."+chatId, Double.doubleToRawLongBits(latLng.getLongitude())); } - public static void setMapZoom(Context context, int chatId, double zoom) { - setLongPreference(context, MAP_ZOOM+chatId, Double.doubleToRawLongBits(zoom)); + public static void setMapZoom(Context context, int accountId, int chatId, double zoom) { + setLongPreference(context, MAP_ZOOM+accountId+"."+chatId, Double.doubleToRawLongBits(zoom)); } - public static LatLng getMapCenter(Context context, int chatId) { - long latitude = getLongPreference(context, MAP_CENTER_LATITUDE+chatId, Long.MAX_VALUE); - long longitude = getLongPreference(context, MAP_CENTER_LONGITUDE+chatId, Long.MAX_VALUE); + public static LatLng getMapCenter(Context context, int accountId, int chatId) { + long latitude = getLongPreference(context, MAP_CENTER_LATITUDE+accountId+"."+chatId, Long.MAX_VALUE); + long longitude = getLongPreference(context, MAP_CENTER_LONGITUDE+accountId+"."+chatId, Long.MAX_VALUE); if (latitude == Long.MAX_VALUE || longitude == Long.MAX_VALUE) { return null; } return new LatLng(Double.longBitsToDouble(latitude), Double.longBitsToDouble(longitude)); } - public static double getMapZoom(Context context, int chatId) { - long zoom = getLongPreference(context, MAP_ZOOM+chatId, Double.doubleToLongBits(MINIMUM_ZOOM)); + public static double getMapZoom(Context context, int accountId, int chatId) { + long zoom = getLongPreference(context, MAP_ZOOM+accountId+"."+chatId, Double.doubleToLongBits(MINIMUM_ZOOM)); return Double.longBitsToDouble(zoom); } From d65c45f96ae420df321d7a5a15b65e6d42efc621 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 16:33:23 +0200 Subject: [PATCH 133/169] allow to set chat background per-account --- .../securesms/ConversationActivity.java | 3 ++- .../AppearancePreferenceFragment.java | 4 ++-- .../preferences/ChatBackgroundActivity.java | 16 ++++++++++------ src/org/thoughtcrime/securesms/util/Prefs.java | 8 ++++---- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 03449391b..1ef3ca8bd 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -858,7 +858,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void initializeBackground() { - String backgroundImagePath = Prefs.getBackgroundImagePath(this); + String backgroundImagePath = Prefs.getBackgroundImagePath(this, dcContext.getAccountId()); Drawable background; if(!backgroundImagePath.isEmpty()) { background = Drawable.createFromPath(backgroundImagePath); @@ -892,6 +892,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity AccountManager.getInstance().switchAccount(context, accountId); dcContext = context.dcContext; fragment.dcContext = context.dcContext; + initializeBackground(); } chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, -1); if(chatId == DcChat.DC_CHAT_NO_CHAT) diff --git a/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java index 944a464e9..5372c10e3 100644 --- a/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java @@ -46,7 +46,7 @@ public class AppearancePreferenceFragment extends ListSummaryPreferenceFragment public void onResume() { super.onResume(); ((ApplicationPreferencesActivity) getActivity()).getSupportActionBar().setTitle(R.string.pref_appearance); - String imagePath = Prefs.getBackgroundImagePath(getContext()); + String imagePath = Prefs.getBackgroundImagePath(getContext(), dcContext.getAccountId()); String backgroundString; if(imagePath.isEmpty()){ backgroundString = this.getString(R.string.def); @@ -75,7 +75,7 @@ public class AppearancePreferenceFragment extends ListSummaryPreferenceFragment int themeIndex = Arrays.asList(themeEntryValues).indexOf(Prefs.getTheme(context)); if (themeIndex == -1) themeIndex = 0; - String imagePath = Prefs.getBackgroundImagePath(context); + String imagePath = Prefs.getBackgroundImagePath(context, DcHelper.getContext(context).getAccountId()); String backgroundString; if(imagePath.isEmpty()){ backgroundString = context.getString(R.string.def); diff --git a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java index 4baf8f09f..1718ccccd 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java @@ -23,6 +23,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy; import org.thoughtcrime.securesms.ApplicationPreferencesActivity; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; import org.thoughtcrime.securesms.R; +import org.thoughtcrime.securesms.connect.DcHelper; import org.thoughtcrime.securesms.mms.AttachmentManager; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.util.DynamicTheme; @@ -44,6 +45,8 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity Uri imageUri; Boolean imageUpdate = false; + private int accountId; + @Override protected void onCreate(Bundle savedInstanceState, boolean ready) { setContentView(R.layout.activity_select_chat_background); @@ -51,11 +54,12 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity defaultButton = findViewById(R.id.set_default_button); galleryButton = findViewById(R.id.from_gallery_button); preview = findViewById(R.id.preview); + accountId = DcHelper.getContext(getApplicationContext()).getAccountId(); defaultButton.setOnClickListener(new DefaultClickListener()); galleryButton.setOnClickListener(new GalleryClickListener()); - String backgroundImagePath = Prefs.getBackgroundImagePath(this); + String backgroundImagePath = Prefs.getBackgroundImagePath(this, accountId); if(backgroundImagePath.isEmpty()){ setDefaultLayoutBackgroundImage(); }else { @@ -94,13 +98,13 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity @Override public void run() { String destination = context.getFilesDir().getAbsolutePath() + "/background"; - Prefs.setBackgroundImagePath(context, destination); + Prefs.setBackgroundImagePath(context, accountId, destination); scaleAndSaveImage(context, destination); } }; thread.start(); } else { - Prefs.setBackgroundImagePath(context, ""); + Prefs.setBackgroundImagePath(context, accountId, ""); } } finish(); @@ -133,15 +137,15 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 85, outStream); } catch (InterruptedException e) { e.printStackTrace(); - Prefs.setBackgroundImagePath(context, ""); + Prefs.setBackgroundImagePath(context, accountId, ""); showBackgroundSaveError(); } catch (ExecutionException e) { e.printStackTrace(); - Prefs.setBackgroundImagePath(context, ""); + Prefs.setBackgroundImagePath(context, accountId, ""); showBackgroundSaveError(); } catch (FileNotFoundException e) { e.printStackTrace(); - Prefs.setBackgroundImagePath(context, ""); + Prefs.setBackgroundImagePath(context, accountId, ""); showBackgroundSaveError(); } } diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index c127de055..0578de179 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -306,12 +306,12 @@ public class Prefs { // misc. - public static String getBackgroundImagePath(Context context) { - return getStringPreference(context, BACKGROUND_PREF, ""); + public static String getBackgroundImagePath(Context context, int accountId) { + return getStringPreference(context, BACKGROUND_PREF+accountId, ""); } - public static void setBackgroundImagePath(Context context, String path) { - setStringPreference(context, BACKGROUND_PREF, path); + public static void setBackgroundImagePath(Context context, int accountId, String path) { + setStringPreference(context, BACKGROUND_PREF+accountId, path); } public static boolean isSystemEmojiPreferred(Context context) { From e6e92f60e8e91f0f6cecc597ff6b688ef7eda6f5 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 20:10:03 +0200 Subject: [PATCH 134/169] be backwards compatible also fix bug: save custom wallpaper in different file per account --- .../preferences/ChatBackgroundActivity.java | 13 +++++++++++-- src/org/thoughtcrime/securesms/util/Prefs.java | 8 ++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java index 1718ccccd..3a66d2e54 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java @@ -56,10 +56,19 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity preview = findViewById(R.id.preview); accountId = DcHelper.getContext(getApplicationContext()).getAccountId(); + // try to be backwards compatible so users don't lose already set background + String backgroundImagePath = Prefs.getBackgroundImagePathLegacy(this); + if (!backgroundImagePath.isEmpty()) { + for (int accId : DcHelper.getAccounts(getApplicationContext()).getAll()) { + Prefs.setBackgroundImagePath(this, accId, backgroundImagePath); + } + Prefs.setBackgroundImagePathLegacy(this, ""); + } + defaultButton.setOnClickListener(new DefaultClickListener()); galleryButton.setOnClickListener(new GalleryClickListener()); - String backgroundImagePath = Prefs.getBackgroundImagePath(this, accountId); + backgroundImagePath = Prefs.getBackgroundImagePath(this, accountId); if(backgroundImagePath.isEmpty()){ setDefaultLayoutBackgroundImage(); }else { @@ -97,7 +106,7 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity Thread thread = new Thread() { @Override public void run() { - String destination = context.getFilesDir().getAbsolutePath() + "/background"; + String destination = context.getFilesDir().getAbsolutePath() + "/background."+ accountId; Prefs.setBackgroundImagePath(context, accountId, destination); scaleAndSaveImage(context, destination); } diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index 0578de179..c580c02ef 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -306,6 +306,14 @@ public class Prefs { // misc. + public static String getBackgroundImagePathLegacy(Context context) { + return getStringPreference(context, BACKGROUND_PREF, ""); + } + + public static void setBackgroundImagePathLegacy(Context context, String path) { + setStringPreference(context, BACKGROUND_PREF, path); + } + public static String getBackgroundImagePath(Context context, int accountId) { return getStringPreference(context, BACKGROUND_PREF+accountId, ""); } From 41588d0de310e013124b987230a6c345e3f8bf8a Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 22:19:26 +0200 Subject: [PATCH 135/169] move migration to ApplicationContext --- .../thoughtcrime/securesms/ApplicationContext.java | 10 ++++++++++ .../securesms/preferences/ChatBackgroundActivity.java | 11 +---------- src/org/thoughtcrime/securesms/util/Prefs.java | 8 -------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index da89d35a4..3cd257d4e 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -43,6 +43,7 @@ import org.thoughtcrime.securesms.notifications.NotificationCenter; import org.thoughtcrime.securesms.util.AndroidSignalProtocolLogger; import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicTheme; +import org.thoughtcrime.securesms.util.Prefs; import org.thoughtcrime.securesms.util.SignalProtocolLoggerProvider; import java.io.File; @@ -127,6 +128,15 @@ public class ApplicationContext extends MultiDexApplication { rpc.start(); + // [Migration 04/10/23] Chat Background: migrate old custom background + String backgroundImagePath = Prefs.getStringPreference(this, "pref_chat_background", ""); + if (!backgroundImagePath.isEmpty()) { + for (int accId : dcAccounts.getAll()) { + Prefs.setBackgroundImagePath(this, accId, backgroundImagePath); + } + Prefs.setStringPreference(this, "pref_chat_background", ""); + } + // set translations before starting I/O to avoid sending untranslated MDNs (issue #2288) DcHelper.setStockTranslations(this); diff --git a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java index 3a66d2e54..295fe8c09 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java @@ -56,19 +56,10 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity preview = findViewById(R.id.preview); accountId = DcHelper.getContext(getApplicationContext()).getAccountId(); - // try to be backwards compatible so users don't lose already set background - String backgroundImagePath = Prefs.getBackgroundImagePathLegacy(this); - if (!backgroundImagePath.isEmpty()) { - for (int accId : DcHelper.getAccounts(getApplicationContext()).getAll()) { - Prefs.setBackgroundImagePath(this, accId, backgroundImagePath); - } - Prefs.setBackgroundImagePathLegacy(this, ""); - } - defaultButton.setOnClickListener(new DefaultClickListener()); galleryButton.setOnClickListener(new GalleryClickListener()); - backgroundImagePath = Prefs.getBackgroundImagePath(this, accountId); + String backgroundImagePath = Prefs.getBackgroundImagePath(this, accountId); if(backgroundImagePath.isEmpty()){ setDefaultLayoutBackgroundImage(); }else { diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index c580c02ef..0578de179 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -306,14 +306,6 @@ public class Prefs { // misc. - public static String getBackgroundImagePathLegacy(Context context) { - return getStringPreference(context, BACKGROUND_PREF, ""); - } - - public static void setBackgroundImagePathLegacy(Context context, String path) { - setStringPreference(context, BACKGROUND_PREF, path); - } - public static String getBackgroundImagePath(Context context, int accountId) { return getStringPreference(context, BACKGROUND_PREF+accountId, ""); } From 3242f12052cecd485b5b6e496705a7f710b25f2b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 22:16:58 +0200 Subject: [PATCH 136/169] remove dead code the screen-lock functionality was removed in https://github.com/deltachat/deltachat-android/pull/1942 ; the getters/setters were in use a little longer for a migration device messsage, however, meanwhile this migration is removed as well. --- .../securesms/notifications/NotificationCenter.java | 3 +-- src/org/thoughtcrime/securesms/util/Prefs.java | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index 7f1d46c38..3bf8ce800 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -446,8 +446,7 @@ public class NotificationCenter { // add buttons that allow some actions without opening Delta Chat. // if privacy options are enabled, the buttons are not added. - if (privacy.isDisplayContact() && privacy.isDisplayMessage() - && !Prefs.isScreenLockEnabled(context)) { + if (privacy.isDisplayContact() && privacy.isDisplayMessage()) { try { PendingIntent inNotificationReplyIntent = getRemoteReplyIntent(chatData); PendingIntent markReadIntent = getMarkAsReadIntent(chatData, true); diff --git a/src/org/thoughtcrime/securesms/util/Prefs.java b/src/org/thoughtcrime/securesms/util/Prefs.java index 1ee7deb98..776f6b0c1 100644 --- a/src/org/thoughtcrime/securesms/util/Prefs.java +++ b/src/org/thoughtcrime/securesms/util/Prefs.java @@ -62,8 +62,6 @@ public class Prefs { private static final String PROFILE_AVATAR_ID_PREF = "pref_profile_avatar_id"; public static final String INCOGNITO_KEYBORAD_PREF = "pref_incognito_keyboard"; - public static final String SCREEN_LOCK = "pref_android_screen_lock"; - private static final String PREF_CONTACT_PHOTO_IDENTIFIERS = "pref_contact_photo_identifiers"; private static final String MAP_CENTER_LATITUDE = "pref_map_center_latitude"; @@ -81,14 +79,6 @@ public class Prefs { public static VibrateState fromId(int id) { return values()[id]; } } - public static boolean isScreenLockEnabled(@NonNull Context context) { - return getBooleanPreference(context, SCREEN_LOCK, false); - } - - public static void setScreenLockEnabled(@NonNull Context context, boolean value) { - setBooleanPreference(context, SCREEN_LOCK, value); - } - public static void setDatabaseEncryptedSecret(@NonNull Context context, @NonNull String secret, int accountId) { setStringPreference(context, DATABASE_ENCRYPTED_SECRET + accountId, secret); } From d1f44e9c82ff303b197dd8af749404e9ee7a4b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Wed, 4 Oct 2023 17:28:44 -0400 Subject: [PATCH 137/169] Update src/org/thoughtcrime/securesms/ApplicationContext.java Co-authored-by: bjoern --- src/org/thoughtcrime/securesms/ApplicationContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 3cd257d4e..9530a68f6 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -128,7 +128,7 @@ public class ApplicationContext extends MultiDexApplication { rpc.start(); - // [Migration 04/10/23] Chat Background: migrate old custom background + // migrating chat backgrounds, added 04/10/23, can be removed after some versions String backgroundImagePath = Prefs.getStringPreference(this, "pref_chat_background", ""); if (!backgroundImagePath.isEmpty()) { for (int accId : dcAccounts.getAll()) { @@ -136,6 +136,7 @@ public class ApplicationContext extends MultiDexApplication { } Prefs.setStringPreference(this, "pref_chat_background", ""); } + // /migrating chat backgrounds // set translations before starting I/O to avoid sending untranslated MDNs (issue #2288) DcHelper.setStockTranslations(this); From 1adf8e5d38ad1dd1212ccd755a53b106c32f16b5 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 4 Oct 2023 23:35:04 +0200 Subject: [PATCH 138/169] allow to select all media --- res/menu/profile_context.xml | 4 ++++ .../securesms/ProfileDocumentsAdapter.java | 6 ++++++ .../securesms/ProfileDocumentsFragment.java | 10 +++++++++- .../thoughtcrime/securesms/ProfileGalleryAdapter.java | 6 ++++++ .../securesms/ProfileGalleryFragment.java | 10 +++++++++- .../securesms/ProfileSettingsFragment.java | 1 + .../database/loaders/BucketedThreadMediaLoader.java | 11 +++++++++++ 7 files changed, 46 insertions(+), 2 deletions(-) diff --git a/res/menu/profile_context.xml b/res/menu/profile_context.xml index 408771636..2ac3d5dcd 100644 --- a/res/menu/profile_context.xml +++ b/res/menu/profile_context.xml @@ -31,4 +31,8 @@ + + diff --git a/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java b/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java index 8830a4de5..c16f47c88 100644 --- a/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java @@ -160,6 +160,12 @@ class ProfileDocumentsAdapter extends StickyHeaderGridAdapter { notifyDataSetChanged(); } + public void selectAll() { + selected.clear(); + selected.addAll(media.getAll()); + notifyDataSetChanged(); + } + public int getSelectedMediaCount() { return selected.size(); } diff --git a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java index 12eb90ab4..807f6411e 100644 --- a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java @@ -150,6 +150,10 @@ public class ProfileDocumentsFragment } } + private void updateActionModeTitle() { + actionMode.setTitle(String.valueOf(getListAdapter().getSelectedMediaCount())); + } + private void handleMediaMultiSelectClick(@NonNull DcMsg mediaRecord) { ProfileDocumentsAdapter adapter = getListAdapter(); @@ -158,7 +162,7 @@ public class ProfileDocumentsFragment actionMode.finish(); actionMode = null; } else { - actionMode.setTitle(String.valueOf(adapter.getSelectedMediaCount())); + updateActionModeTitle(); setCorrectMenuVisibility(actionMode.getMenu()); } } @@ -271,6 +275,10 @@ public class ProfileDocumentsFragment case R.id.menu_resend: handleResendMessage(getListAdapter().getSelectedMedia()); return true; + case R.id.menu_select_all: + getListAdapter().selectAll(); + updateActionModeTitle(); + return true; } return false; } diff --git a/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java b/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java index f8a5d085d..483dc66c3 100644 --- a/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java @@ -124,6 +124,12 @@ class ProfileGalleryAdapter extends StickyHeaderGridAdapter { notifyDataSetChanged(); } + public void selectAll() { + selected.clear(); + selected.addAll(media.getAll()); + notifyDataSetChanged(); + } + public int getSelectedMediaCount() { return selected.size(); } diff --git a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java index 8118f572b..4539bdd81 100644 --- a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java @@ -142,6 +142,10 @@ public class ProfileGalleryFragment } } + private void updateActionModeTitle() { + actionMode.setTitle(String.valueOf(getListAdapter().getSelectedMediaCount())); + } + private void handleMediaMultiSelectClick(@NonNull DcMsg mediaRecord) { ProfileGalleryAdapter adapter = getListAdapter(); @@ -150,7 +154,7 @@ public class ProfileGalleryFragment actionMode.finish(); actionMode = null; } else { - actionMode.setTitle(String.valueOf(adapter.getSelectedMediaCount())); + updateActionModeTitle(); setCorrectMenuVisibility(actionMode.getMenu()); } } @@ -258,6 +262,10 @@ public class ProfileGalleryFragment case R.id.menu_resend: handleResendMessage(getListAdapter().getSelectedMedia()); return true; + case R.id.menu_select_all: + getListAdapter().selectAll(); + updateActionModeTitle(); + return true; } return false; } diff --git a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java index 553cfab71..58cbb3754 100644 --- a/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileSettingsFragment.java @@ -272,6 +272,7 @@ public class ProfileSettingsFragment extends Fragment menu.findItem(R.id.save).setVisible(false); menu.findItem(R.id.share).setVisible(false); menu.findItem(R.id.menu_resend).setVisible(false); + menu.findItem(R.id.menu_select_all).setVisible(false); mode.setTitle("1"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { diff --git a/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java b/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java index 9567845fd..57a7db296 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java @@ -118,6 +118,17 @@ public class BucketedThreadMediaLoader extends AsyncTaskLoader getAll() { + LinkedList messages = new LinkedList<>(); + for (TimeBucket section : TIME_SECTIONS) { + messages.addAll(section.records); + } + for (List records : OLDER.months.values()) { + messages.addAll(records); + } + return messages; + } + public int getSectionCount() { return (int)Stream.of(TIME_SECTIONS) .filter(timeBucket -> !timeBucket.isEmpty()) From e7f8dbeb910c90e7529290b444dd4cedacb09205 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 15:08:02 +0200 Subject: [PATCH 139/169] split off AttachContactActivity from BlockedAndShareContactsActivity --- AndroidManifest.xml | 4 + .../securesms/AttachContactActivity.java | 169 ++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 src/org/thoughtcrime/securesms/AttachContactActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index bddd78e96..3fa828bd5 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -273,6 +273,10 @@ android:clearTaskOnLaunch="true" android:finishOnTaskLaunch="true" /> + + diff --git a/src/org/thoughtcrime/securesms/AttachContactActivity.java b/src/org/thoughtcrime/securesms/AttachContactActivity.java new file mode 100644 index 000000000..d770f0606 --- /dev/null +++ b/src/org/thoughtcrime/securesms/AttachContactActivity.java @@ -0,0 +1,169 @@ +package org.thoughtcrime.securesms; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.loader.app.LoaderManager; +import androidx.loader.content.Loader; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.b44t.messenger.DcContext; +import com.b44t.messenger.DcEvent; + +import org.thoughtcrime.securesms.connect.DcContactsLoader; +import org.thoughtcrime.securesms.connect.DcEventCenter; +import org.thoughtcrime.securesms.connect.DcHelper; +import org.thoughtcrime.securesms.contacts.ContactSelectionListAdapter; +import org.thoughtcrime.securesms.contacts.ContactSelectionListItem; +import org.thoughtcrime.securesms.mms.GlideApp; +import org.thoughtcrime.securesms.util.ViewUtil; + +import java.util.Objects; + +public class AttachContactActivity extends PassphraseRequiredActionBarActivity { + + public static final String SHOW_ONLY_BLOCKED_EXTRA = "show_only_blocked"; + public static final String SHARE_CONTACT_NAME_EXTRA = "share_contact_name"; + public static final String SHARE_CONTACT_MAIL_EXTRA = "share_contact_mail"; + + @Override + public void onCreate(Bundle bundle, boolean ready) { + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + boolean showOnlyBlocked = getIntent().getBooleanExtra(SHOW_ONLY_BLOCKED_EXTRA, false); + getSupportActionBar().setTitle(showOnlyBlocked ? R.string.pref_blocked_contacts : R.string.contacts_headline); + initFragment(android.R.id.content, new AttachContactFragment(), null, getIntent().getExtras()); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: finish(); return true; + } + + return false; + } + + public static class AttachContactFragment + extends Fragment + implements LoaderManager.LoaderCallbacks, + DcEventCenter.DcEventDelegate, ContactSelectionListAdapter.ItemClickListener { + + + private RecyclerView recyclerView; + private TextView emptyStateView; + + private boolean showOnlyBlocked; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { + View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false); + recyclerView = ViewUtil.findById(view, R.id.recycler_view); + recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); + emptyStateView = ViewUtil.findById(view, android.R.id.empty); + emptyStateView.setText(R.string.blocked_empty_hint); + return view; + } + + @Override + public void onCreate(Bundle bundle) { + super.onCreate(bundle); + showOnlyBlocked = getArguments().getBoolean(SHOW_ONLY_BLOCKED_EXTRA, false); + getLoaderManager().initLoader(0, null, this); + } + + @Override + public void onActivityCreated(Bundle bundle) { + super.onActivityCreated(bundle); + initializeAdapter(); + } + + private void initializeAdapter() { + ContactSelectionListAdapter adapter = new ContactSelectionListAdapter(getActivity(), + GlideApp.with(this), + this, + false, + false); + recyclerView.setAdapter(adapter); + } + + @Override + public Loader onCreateLoader(int id, Bundle args) { + return new DcContactsLoader(getActivity(), showOnlyBlocked ? -1 : DcContext.DC_GCL_ADD_SELF, null, false, showOnlyBlocked); + } + + @Override + public void onLoadFinished(Loader loader, DcContactsLoader.Ret data) { + ContactSelectionListAdapter adapter = getContactSelectionListAdapter(); + if (adapter != null) { + adapter.changeData(data); + if (emptyStateView != null) { + emptyStateView.setVisibility(adapter.getItemCount() > 0 ? View.GONE : View.VISIBLE); + } + } + } + + @Override + public void onLoaderReset(Loader loader) { + getContactSelectionListAdapter().changeData(null); + } + + @Override + public void handleEvent(@NonNull DcEvent event) { + if (event.getId()==DcContext.DC_EVENT_CONTACTS_CHANGED) { + restartLoader(); + } + } + + private void restartLoader() { + getLoaderManager().restartLoader(0, null, AttachContactFragment.this); + } + + private ContactSelectionListAdapter getContactSelectionListAdapter() { + return (ContactSelectionListAdapter) recyclerView.getAdapter(); + } + + @Override + public void onItemClick(ContactSelectionListItem item, boolean handleActionMode) { + if(showOnlyBlocked) { + new AlertDialog.Builder(getActivity()) + .setMessage(R.string.ask_unblock_contact) + .setCancelable(true) + .setNegativeButton(android.R.string.cancel, null) + .setPositiveButton(R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId())).show(); + } else { + shareContact(item.getName(), item.getNumber()); + } + } + + private void unblockContact(int contactId) { + DcContext dcContext = DcHelper.getContext(getContext()); + dcContext.blockContact(contactId, 0); + restartLoader(); + } + + private void shareContact(String name, String mail) { + Intent intent = new Intent(); + intent.putExtra(AttachContactActivity.SHARE_CONTACT_NAME_EXTRA, name); + intent.putExtra(AttachContactActivity.SHARE_CONTACT_MAIL_EXTRA, mail); + FragmentActivity activity = Objects.requireNonNull(getActivity()); + activity.setResult(RESULT_OK, intent); + activity.finish(); + } + + @Override + public void onItemLongClick(ContactSelectionListItem view) { + // Not needed + } + } + +} From 7a44e16a5dea6a332ed44aa68d2327f421655fa6 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 15:13:18 +0200 Subject: [PATCH 140/169] remove share stuff from BlockedAndShareContactsActivity --- .../BlockedAndShareContactsActivity.java | 35 ++++--------------- .../securesms/ConversationActivity.java | 6 ++-- .../preferences/ChatsPreferenceFragment.java | 1 - 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java index 6b3b801f9..f4ab004ea 100644 --- a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java +++ b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java @@ -32,15 +32,10 @@ import java.util.Objects; public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBarActivity { - public static final String SHOW_ONLY_BLOCKED_EXTRA = "show_only_blocked"; - public static final String SHARE_CONTACT_NAME_EXTRA = "share_contact_name"; - public static final String SHARE_CONTACT_MAIL_EXTRA = "share_contact_mail"; - @Override public void onCreate(Bundle bundle, boolean ready) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); - boolean showOnlyBlocked = getIntent().getBooleanExtra(SHOW_ONLY_BLOCKED_EXTRA, false); - getSupportActionBar().setTitle(showOnlyBlocked ? R.string.pref_blocked_contacts : R.string.contacts_headline); + getSupportActionBar().setTitle(R.string.pref_blocked_contacts); initFragment(android.R.id.content, new BlockedAndShareContactsFragment(), null, getIntent().getExtras()); } @@ -62,8 +57,6 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar private RecyclerView recyclerView; private TextView emptyStateView; - private boolean showOnlyBlocked; - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false); @@ -77,7 +70,6 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); - showOnlyBlocked = getArguments().getBoolean(SHOW_ONLY_BLOCKED_EXTRA, false); getLoaderManager().initLoader(0, null, this); } @@ -98,7 +90,7 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar @Override public Loader onCreateLoader(int id, Bundle args) { - return new DcContactsLoader(getActivity(), showOnlyBlocked ? -1 : DcContext.DC_GCL_ADD_SELF, null, false, showOnlyBlocked); + return new DcContactsLoader(getActivity(), -1, null, false, true); } @Override @@ -134,15 +126,11 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar @Override public void onItemClick(ContactSelectionListItem item, boolean handleActionMode) { - if(showOnlyBlocked) { - new AlertDialog.Builder(getActivity()) - .setMessage(R.string.ask_unblock_contact) - .setCancelable(true) - .setNegativeButton(android.R.string.cancel, null) - .setPositiveButton(R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId())).show(); - } else { - shareContact(item.getName(), item.getNumber()); - } + new AlertDialog.Builder(getActivity()) + .setMessage(R.string.ask_unblock_contact) + .setCancelable(true) + .setNegativeButton(android.R.string.cancel, null) + .setPositiveButton(R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId())).show(); } private void unblockContact(int contactId) { @@ -151,15 +139,6 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar restartLoader(); } - private void shareContact(String name, String mail) { - Intent intent = new Intent(); - intent.putExtra(BlockedAndShareContactsActivity.SHARE_CONTACT_NAME_EXTRA, name); - intent.putExtra(BlockedAndShareContactsActivity.SHARE_CONTACT_MAIL_EXTRA, mail); - FragmentActivity activity = Objects.requireNonNull(getActivity()); - activity.setResult(RESULT_OK, intent); - activity.finish(); - } - @Override public void onItemLongClick(ContactSelectionListItem view) { // Not needed diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 1ef3ca8bd..b79ae6216 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -949,7 +949,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void startContactChooserActivity() { - Intent intent = new Intent(ConversationActivity.this, BlockedAndShareContactsActivity.class); + Intent intent = new Intent(ConversationActivity.this, AttachContactActivity.class); startActivityForResult(intent, PICK_CONTACT); } @@ -966,8 +966,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void addAttachmentContactInfo(Intent data) { - String name = data.getStringExtra(BlockedAndShareContactsActivity.SHARE_CONTACT_NAME_EXTRA); - String mail = data.getStringExtra(BlockedAndShareContactsActivity.SHARE_CONTACT_MAIL_EXTRA); + String name = data.getStringExtra(AttachContactActivity.SHARE_CONTACT_NAME_EXTRA); + String mail = data.getStringExtra(AttachContactActivity.SHARE_CONTACT_MAIL_EXTRA); composeText.append(name + "\n" + mail); } diff --git a/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java index f67dbb25b..85e3f5d6c 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java @@ -186,7 +186,6 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment { @Override public boolean onPreferenceClick(Preference preference) { Intent intent = new Intent(getActivity(), BlockedAndShareContactsActivity.class); - intent.putExtra(BlockedAndShareContactsActivity.SHOW_ONLY_BLOCKED_EXTRA, true); startActivity(intent); return true; } From f9a89feb24ac7c1101a1f697990eb0ccb8aae50d Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 15:17:45 +0200 Subject: [PATCH 141/169] cleanup imports --- .../securesms/BlockedAndShareContactsActivity.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java index f4ab004ea..2623cf106 100644 --- a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java +++ b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java @@ -1,11 +1,9 @@ package org.thoughtcrime.securesms; -import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; import androidx.loader.app.LoaderManager; import androidx.loader.content.Loader; import androidx.appcompat.app.AlertDialog; @@ -28,8 +26,6 @@ import org.thoughtcrime.securesms.contacts.ContactSelectionListItem; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.util.ViewUtil; -import java.util.Objects; - public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBarActivity { @Override From 66d495ae491759268b80627feb6f86720d4a4948 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 15:31:34 +0200 Subject: [PATCH 142/169] derive AttachContactActivity from ContactSelectionActivity --- .../securesms/AttachContactActivity.java | 163 +----------------- 1 file changed, 1 insertion(+), 162 deletions(-) diff --git a/src/org/thoughtcrime/securesms/AttachContactActivity.java b/src/org/thoughtcrime/securesms/AttachContactActivity.java index d770f0606..f57a050d8 100644 --- a/src/org/thoughtcrime/securesms/AttachContactActivity.java +++ b/src/org/thoughtcrime/securesms/AttachContactActivity.java @@ -1,169 +1,8 @@ package org.thoughtcrime.securesms; -import android.content.Intent; -import android.os.Bundle; +public class AttachContactActivity extends ContactSelectionActivity { -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; -import androidx.loader.app.LoaderManager; -import androidx.loader.content.Loader; -import androidx.appcompat.app.AlertDialog; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import com.b44t.messenger.DcContext; -import com.b44t.messenger.DcEvent; - -import org.thoughtcrime.securesms.connect.DcContactsLoader; -import org.thoughtcrime.securesms.connect.DcEventCenter; -import org.thoughtcrime.securesms.connect.DcHelper; -import org.thoughtcrime.securesms.contacts.ContactSelectionListAdapter; -import org.thoughtcrime.securesms.contacts.ContactSelectionListItem; -import org.thoughtcrime.securesms.mms.GlideApp; -import org.thoughtcrime.securesms.util.ViewUtil; - -import java.util.Objects; - -public class AttachContactActivity extends PassphraseRequiredActionBarActivity { - - public static final String SHOW_ONLY_BLOCKED_EXTRA = "show_only_blocked"; public static final String SHARE_CONTACT_NAME_EXTRA = "share_contact_name"; public static final String SHARE_CONTACT_MAIL_EXTRA = "share_contact_mail"; - @Override - public void onCreate(Bundle bundle, boolean ready) { - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - boolean showOnlyBlocked = getIntent().getBooleanExtra(SHOW_ONLY_BLOCKED_EXTRA, false); - getSupportActionBar().setTitle(showOnlyBlocked ? R.string.pref_blocked_contacts : R.string.contacts_headline); - initFragment(android.R.id.content, new AttachContactFragment(), null, getIntent().getExtras()); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: finish(); return true; - } - - return false; - } - - public static class AttachContactFragment - extends Fragment - implements LoaderManager.LoaderCallbacks, - DcEventCenter.DcEventDelegate, ContactSelectionListAdapter.ItemClickListener { - - - private RecyclerView recyclerView; - private TextView emptyStateView; - - private boolean showOnlyBlocked; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { - View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false); - recyclerView = ViewUtil.findById(view, R.id.recycler_view); - recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); - emptyStateView = ViewUtil.findById(view, android.R.id.empty); - emptyStateView.setText(R.string.blocked_empty_hint); - return view; - } - - @Override - public void onCreate(Bundle bundle) { - super.onCreate(bundle); - showOnlyBlocked = getArguments().getBoolean(SHOW_ONLY_BLOCKED_EXTRA, false); - getLoaderManager().initLoader(0, null, this); - } - - @Override - public void onActivityCreated(Bundle bundle) { - super.onActivityCreated(bundle); - initializeAdapter(); - } - - private void initializeAdapter() { - ContactSelectionListAdapter adapter = new ContactSelectionListAdapter(getActivity(), - GlideApp.with(this), - this, - false, - false); - recyclerView.setAdapter(adapter); - } - - @Override - public Loader onCreateLoader(int id, Bundle args) { - return new DcContactsLoader(getActivity(), showOnlyBlocked ? -1 : DcContext.DC_GCL_ADD_SELF, null, false, showOnlyBlocked); - } - - @Override - public void onLoadFinished(Loader loader, DcContactsLoader.Ret data) { - ContactSelectionListAdapter adapter = getContactSelectionListAdapter(); - if (adapter != null) { - adapter.changeData(data); - if (emptyStateView != null) { - emptyStateView.setVisibility(adapter.getItemCount() > 0 ? View.GONE : View.VISIBLE); - } - } - } - - @Override - public void onLoaderReset(Loader loader) { - getContactSelectionListAdapter().changeData(null); - } - - @Override - public void handleEvent(@NonNull DcEvent event) { - if (event.getId()==DcContext.DC_EVENT_CONTACTS_CHANGED) { - restartLoader(); - } - } - - private void restartLoader() { - getLoaderManager().restartLoader(0, null, AttachContactFragment.this); - } - - private ContactSelectionListAdapter getContactSelectionListAdapter() { - return (ContactSelectionListAdapter) recyclerView.getAdapter(); - } - - @Override - public void onItemClick(ContactSelectionListItem item, boolean handleActionMode) { - if(showOnlyBlocked) { - new AlertDialog.Builder(getActivity()) - .setMessage(R.string.ask_unblock_contact) - .setCancelable(true) - .setNegativeButton(android.R.string.cancel, null) - .setPositiveButton(R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId())).show(); - } else { - shareContact(item.getName(), item.getNumber()); - } - } - - private void unblockContact(int contactId) { - DcContext dcContext = DcHelper.getContext(getContext()); - dcContext.blockContact(contactId, 0); - restartLoader(); - } - - private void shareContact(String name, String mail) { - Intent intent = new Intent(); - intent.putExtra(AttachContactActivity.SHARE_CONTACT_NAME_EXTRA, name); - intent.putExtra(AttachContactActivity.SHARE_CONTACT_MAIL_EXTRA, mail); - FragmentActivity activity = Objects.requireNonNull(getActivity()); - activity.setResult(RESULT_OK, intent); - activity.finish(); - } - - @Override - public void onItemLongClick(ContactSelectionListItem view) { - // Not needed - } - } - } From ecd15d4c44e9e9bf5e6df04f573128cd2a9f64e8 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 15:36:57 +0200 Subject: [PATCH 143/169] move back-button handling to base class ContactSelectionActivity --- .../securesms/ContactMultiSelectionActivity.java | 3 --- .../securesms/ContactSelectionActivity.java | 12 ++++++++++++ .../securesms/NewConversationActivity.java | 12 ------------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java b/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java index d7090f5f1..291423df2 100644 --- a/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java +++ b/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java @@ -65,9 +65,6 @@ public class ContactMultiSelectionActivity extends ContactSelectionActivity { saveSelection(); finish(); return true; - case android.R.id.home: - finish(); - return true; } return false; diff --git a/src/org/thoughtcrime/securesms/ContactSelectionActivity.java b/src/org/thoughtcrime/securesms/ContactSelectionActivity.java index d502728d9..cff905c4b 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionActivity.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionActivity.java @@ -17,6 +17,7 @@ package org.thoughtcrime.securesms; import android.os.Bundle; +import android.view.MenuItem; import org.thoughtcrime.securesms.components.ContactFilterToolbar; import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme; @@ -76,6 +77,17 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB toolbar.setOnFilterChangedListener(filter -> contactsFragment.setQueryFilter(filter)); } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + super.onOptionsItemSelected(item); + + switch (item.getItemId()) { + case android.R.id.home: super.onBackPressed(); return true; + } + + return false; + } + @Override public void onContactSelected(int specialId, String number) {} diff --git a/src/org/thoughtcrime/securesms/NewConversationActivity.java b/src/org/thoughtcrime/securesms/NewConversationActivity.java index 15f657239..666e9574c 100644 --- a/src/org/thoughtcrime/securesms/NewConversationActivity.java +++ b/src/org/thoughtcrime/securesms/NewConversationActivity.java @@ -22,7 +22,6 @@ import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.Menu; -import android.view.MenuItem; import android.view.View; import android.widget.Toast; @@ -186,17 +185,6 @@ public class NewConversationActivity extends ContactSelectionActivity { finish(); } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - super.onOptionsItemSelected(item); - - switch (item.getItemId()) { - case android.R.id.home: super.onBackPressed(); return true; - } - - return false; - } - @Override protected boolean onPrepareOptionsPanel(View view, Menu menu) { /* currently not needed From 6fd19d2da42860e3c424f90a88617b3b40da4cdb Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 16:04:22 +0200 Subject: [PATCH 144/169] share contact data --- .../securesms/AttachContactActivity.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/org/thoughtcrime/securesms/AttachContactActivity.java b/src/org/thoughtcrime/securesms/AttachContactActivity.java index f57a050d8..2dbae1833 100644 --- a/src/org/thoughtcrime/securesms/AttachContactActivity.java +++ b/src/org/thoughtcrime/securesms/AttachContactActivity.java @@ -1,8 +1,29 @@ package org.thoughtcrime.securesms; +import android.content.Intent; + +import com.b44t.messenger.DcContact; +import com.b44t.messenger.DcContext; + +import org.thoughtcrime.securesms.connect.DcHelper; + public class AttachContactActivity extends ContactSelectionActivity { public static final String SHARE_CONTACT_NAME_EXTRA = "share_contact_name"; public static final String SHARE_CONTACT_MAIL_EXTRA = "share_contact_mail"; + @Override + public void onContactSelected(int specialId, String addr) { + String name = ""; + DcContext dcContext = DcHelper.getContext(this); + int contactId = dcContext.lookupContactIdByAddr(addr); + if (contactId != 0) { + name = dcContext.getContact(contactId).getName(); + } + Intent intent = new Intent(); + intent.putExtra(SHARE_CONTACT_NAME_EXTRA, name); + intent.putExtra(SHARE_CONTACT_MAIL_EXTRA, addr); + setResult(RESULT_OK, intent); + finish(); + } } From 56044f39eedf6eadfc90ad5c8147fe9864cb191f Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 16:21:25 +0200 Subject: [PATCH 145/169] mimic the previous behavior --- src/org/thoughtcrime/securesms/AttachContactActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/AttachContactActivity.java b/src/org/thoughtcrime/securesms/AttachContactActivity.java index 2dbae1833..7ce83c05a 100644 --- a/src/org/thoughtcrime/securesms/AttachContactActivity.java +++ b/src/org/thoughtcrime/securesms/AttachContactActivity.java @@ -18,7 +18,7 @@ public class AttachContactActivity extends ContactSelectionActivity { DcContext dcContext = DcHelper.getContext(this); int contactId = dcContext.lookupContactIdByAddr(addr); if (contactId != 0) { - name = dcContext.getContact(contactId).getName(); + name = dcContext.getContact(contactId).getDisplayName(); } Intent intent = new Intent(); intent.putExtra(SHARE_CONTACT_NAME_EXTRA, name); From a66562ac5d5cbcb8fa925c835c212847d6214187 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 22:49:00 +0200 Subject: [PATCH 146/169] on-point names --- .../thoughtcrime/securesms/AttachContactActivity.java | 9 ++++----- src/org/thoughtcrime/securesms/ConversationActivity.java | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/org/thoughtcrime/securesms/AttachContactActivity.java b/src/org/thoughtcrime/securesms/AttachContactActivity.java index 7ce83c05a..1cdbf9c81 100644 --- a/src/org/thoughtcrime/securesms/AttachContactActivity.java +++ b/src/org/thoughtcrime/securesms/AttachContactActivity.java @@ -2,15 +2,14 @@ package org.thoughtcrime.securesms; import android.content.Intent; -import com.b44t.messenger.DcContact; import com.b44t.messenger.DcContext; import org.thoughtcrime.securesms.connect.DcHelper; public class AttachContactActivity extends ContactSelectionActivity { - public static final String SHARE_CONTACT_NAME_EXTRA = "share_contact_name"; - public static final String SHARE_CONTACT_MAIL_EXTRA = "share_contact_mail"; + public static final String NAME_EXTRA = "name_extra"; + public static final String ADDR_EXTRA = "addr_extra"; @Override public void onContactSelected(int specialId, String addr) { @@ -21,8 +20,8 @@ public class AttachContactActivity extends ContactSelectionActivity { name = dcContext.getContact(contactId).getDisplayName(); } Intent intent = new Intent(); - intent.putExtra(SHARE_CONTACT_NAME_EXTRA, name); - intent.putExtra(SHARE_CONTACT_MAIL_EXTRA, addr); + intent.putExtra(NAME_EXTRA, name); + intent.putExtra(ADDR_EXTRA, addr); setResult(RESULT_OK, intent); finish(); } diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index b79ae6216..33fa2375d 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -966,8 +966,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void addAttachmentContactInfo(Intent data) { - String name = data.getStringExtra(AttachContactActivity.SHARE_CONTACT_NAME_EXTRA); - String mail = data.getStringExtra(AttachContactActivity.SHARE_CONTACT_MAIL_EXTRA); + String name = data.getStringExtra(AttachContactActivity.NAME_EXTRA); + String mail = data.getStringExtra(AttachContactActivity.ADDR_EXTRA); composeText.append(name + "\n" + mail); } From ca55d723949a584e9769f7f72b1f92bce2d99b25 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 23:06:39 +0200 Subject: [PATCH 147/169] hide 'new group' etc. in attach contact --- src/org/thoughtcrime/securesms/ConversationActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 33fa2375d..1ea6be666 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -950,6 +950,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity private void startContactChooserActivity() { Intent intent = new Intent(ConversationActivity.this, AttachContactActivity.class); + intent.putExtra(ContactSelectionListFragment.FROM_SHARE_ACTIVITY_EXTRA, true); startActivityForResult(intent, PICK_CONTACT); } From ff1ca22b5fe4b1a9505f3a986e785d6d25836ffa Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 23:29:19 +0200 Subject: [PATCH 148/169] do not allow new contact creation on attaching contact --- .../securesms/BlockedAndShareContactsActivity.java | 2 +- .../securesms/ContactSelectionListFragment.java | 4 +++- src/org/thoughtcrime/securesms/ConversationActivity.java | 1 + .../thoughtcrime/securesms/connect/DcContactsLoader.java | 6 ++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java index 2623cf106..cf2e72569 100644 --- a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java +++ b/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java @@ -86,7 +86,7 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar @Override public Loader onCreateLoader(int id, Bundle args) { - return new DcContactsLoader(getActivity(), -1, null, false, true); + return new DcContactsLoader(getActivity(), -1, null, false, true, true); } @Override diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 4c0791403..3ca515247 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -83,6 +83,7 @@ public class ContactSelectionListFragment extends Fragment public static final String MULTI_SELECT = "multi_select"; public static final String SELECT_VERIFIED_EXTRA = "select_verified"; public static final String FROM_SHARE_ACTIVITY_EXTRA = "from_share_activity"; + public static final String ALLOW_CREATION = "allow_creation"; public static final String PRESELECTED_CONTACTS = "preselected_contacts"; private DcContext dcContext; @@ -287,7 +288,8 @@ public class ContactSelectionListFragment extends Fragment if(isSelectVerfied()) { listflags = DcContext.DC_GCL_VERIFIED_ONLY; } - return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, false); + boolean allowCreation = getActivity().getIntent().getBooleanExtra(ALLOW_CREATION, true); + return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, false, allowCreation); } @Override diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 1ea6be666..52f86a938 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -951,6 +951,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity private void startContactChooserActivity() { Intent intent = new Intent(ConversationActivity.this, AttachContactActivity.class); intent.putExtra(ContactSelectionListFragment.FROM_SHARE_ACTIVITY_EXTRA, true); + intent.putExtra(ContactSelectionListFragment.ALLOW_CREATION, false); startActivityForResult(intent, PICK_CONTACT); } diff --git a/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java b/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java index 8f25573fd..02117c604 100644 --- a/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java +++ b/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java @@ -18,13 +18,15 @@ public class DcContactsLoader extends AsyncLoader { private final String query; private final boolean addCreateGroupLinks; private final boolean blockedContacts; + private final boolean allowCreation; - public DcContactsLoader(Context context, int listflags, String query, boolean addCreateGroupLinks, boolean blockedContacts) { + public DcContactsLoader(Context context, int listflags, String query, boolean addCreateGroupLinks, boolean blockedContacts, boolean allowCreation) { super(context); this.listflags = listflags; this.query = (query==null||query.isEmpty())? null : query; this.addCreateGroupLinks = addCreateGroupLinks; this.blockedContacts = blockedContacts; + this.allowCreation = allowCreation; } @Override @@ -39,7 +41,7 @@ public class DcContactsLoader extends AsyncLoader { int[] contact_ids = dcContext.getContacts(listflags, query); if(query!=null) { // show the "new contact" link also for partly typed e-mail addresses, so that the user knows he can continue - if (dcContext.lookupContactIdByAddr(query)==0 && (listflags&DcContext.DC_GCL_VERIFIED_ONLY)==0) { + if (allowCreation && dcContext.lookupContactIdByAddr(query)==0 && (listflags&DcContext.DC_GCL_VERIFIED_ONLY)==0) { contact_ids = Util.appendInt(contact_ids, DcContact.DC_CONTACT_ID_NEW_CONTACT); } return new DcContactsLoader.Ret(contact_ids, query); From 6132737a2446f4d1a4df6de0aeaefa2f5be6e5a2 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 23:38:51 +0200 Subject: [PATCH 149/169] simplify condition --- .../thoughtcrime/securesms/ContactSelectionListFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 3ca515247..71665d5a5 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -283,7 +283,7 @@ public class ContactSelectionListFragment extends Fragment @Override public Loader onCreateLoader(int id, Bundle args) { - boolean addCreateGroupLinks = isFromShareActivity() || isRelayingMessageContent(getActivity()) ? false : !isMulti(); + boolean addCreateGroupLinks = !isFromShareActivity() && !isRelayingMessageContent(getActivity()) && !isMulti(); int listflags = DcContext.DC_GCL_ADD_SELF; if(isSelectVerfied()) { listflags = DcContext.DC_GCL_VERIFIED_ONLY; From 134d7ad4c2d2b6500a430965209987029cdf1572 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 4 Oct 2023 23:55:55 +0200 Subject: [PATCH 150/169] remove unneeded FROM_SHARE_ACTIVITY_EXTRA --- .../securesms/ContactSelectionListFragment.java | 9 ++------- src/org/thoughtcrime/securesms/ConversationActivity.java | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 71665d5a5..3e2a258da 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -82,7 +82,6 @@ public class ContactSelectionListFragment extends Fragment public static final String MULTI_SELECT = "multi_select"; public static final String SELECT_VERIFIED_EXTRA = "select_verified"; - public static final String FROM_SHARE_ACTIVITY_EXTRA = "from_share_activity"; public static final String ALLOW_CREATION = "allow_creation"; public static final String PRESELECTED_CONTACTS = "preselected_contacts"; @@ -258,10 +257,6 @@ public class ContactSelectionListFragment extends Fragment return getActivity().getIntent().getBooleanExtra(SELECT_VERIFIED_EXTRA, false); } - private boolean isFromShareActivity() { - return getActivity().getIntent().getBooleanExtra(FROM_SHARE_ACTIVITY_EXTRA, false); - } - private void initializeCursor() { ContactSelectionListAdapter adapter = new ContactSelectionListAdapter(getActivity(), GlideApp.with(this), @@ -283,12 +278,12 @@ public class ContactSelectionListFragment extends Fragment @Override public Loader onCreateLoader(int id, Bundle args) { - boolean addCreateGroupLinks = !isFromShareActivity() && !isRelayingMessageContent(getActivity()) && !isMulti(); + boolean allowCreation = getActivity().getIntent().getBooleanExtra(ALLOW_CREATION, true); + boolean addCreateGroupLinks = allowCreation && !isRelayingMessageContent(getActivity()) && !isMulti(); int listflags = DcContext.DC_GCL_ADD_SELF; if(isSelectVerfied()) { listflags = DcContext.DC_GCL_VERIFIED_ONLY; } - boolean allowCreation = getActivity().getIntent().getBooleanExtra(ALLOW_CREATION, true); return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, false, allowCreation); } diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 52f86a938..11cd957ea 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -950,7 +950,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity private void startContactChooserActivity() { Intent intent = new Intent(ConversationActivity.this, AttachContactActivity.class); - intent.putExtra(ContactSelectionListFragment.FROM_SHARE_ACTIVITY_EXTRA, true); intent.putExtra(ContactSelectionListFragment.ALLOW_CREATION, false); startActivityForResult(intent, PICK_CONTACT); } From c212f0930d8d0053c4cf8390755b234883734cb8 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 00:05:32 +0200 Subject: [PATCH 151/169] streamline parameter order --- .../securesms/ContactSelectionListFragment.java | 4 +++- .../thoughtcrime/securesms/connect/DcContactsLoader.java | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 3e2a258da..415182ef1 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -279,12 +279,14 @@ public class ContactSelectionListFragment extends Fragment @Override public Loader onCreateLoader(int id, Bundle args) { boolean allowCreation = getActivity().getIntent().getBooleanExtra(ALLOW_CREATION, true); + boolean addCreateContactLink = allowCreation; boolean addCreateGroupLinks = allowCreation && !isRelayingMessageContent(getActivity()) && !isMulti(); + int listflags = DcContext.DC_GCL_ADD_SELF; if(isSelectVerfied()) { listflags = DcContext.DC_GCL_VERIFIED_ONLY; } - return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, false, allowCreation); + return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, addCreateContactLink, false); } @Override diff --git a/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java b/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java index 02117c604..19e985224 100644 --- a/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java +++ b/src/org/thoughtcrime/securesms/connect/DcContactsLoader.java @@ -17,16 +17,16 @@ public class DcContactsLoader extends AsyncLoader { private final int listflags; private final String query; private final boolean addCreateGroupLinks; + private final boolean addCreateContactLink; private final boolean blockedContacts; - private final boolean allowCreation; - public DcContactsLoader(Context context, int listflags, String query, boolean addCreateGroupLinks, boolean blockedContacts, boolean allowCreation) { + public DcContactsLoader(Context context, int listflags, String query, boolean addCreateGroupLinks, boolean addCreateContactLink, boolean blockedContacts) { super(context); this.listflags = listflags; this.query = (query==null||query.isEmpty())? null : query; this.addCreateGroupLinks = addCreateGroupLinks; + this.addCreateContactLink= addCreateContactLink; this.blockedContacts = blockedContacts; - this.allowCreation = allowCreation; } @Override @@ -41,7 +41,7 @@ public class DcContactsLoader extends AsyncLoader { int[] contact_ids = dcContext.getContacts(listflags, query); if(query!=null) { // show the "new contact" link also for partly typed e-mail addresses, so that the user knows he can continue - if (allowCreation && dcContext.lookupContactIdByAddr(query)==0 && (listflags&DcContext.DC_GCL_VERIFIED_ONLY)==0) { + if (addCreateContactLink && dcContext.lookupContactIdByAddr(query)==0 && (listflags&DcContext.DC_GCL_VERIFIED_ONLY)==0) { contact_ids = Util.appendInt(contact_ids, DcContact.DC_CONTACT_ID_NEW_CONTACT); } return new DcContactsLoader.Ret(contact_ids, query); From 6775fa08add6f94f5cb58d6b8f2056e7ba5a382b Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 5 Oct 2023 00:39:27 +0200 Subject: [PATCH 152/169] update menu when select-all is triggered --- .../thoughtcrime/securesms/ProfileDocumentsFragment.java | 8 ++++---- .../thoughtcrime/securesms/ProfileGalleryFragment.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java index 807f6411e..054cf958d 100644 --- a/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileDocumentsFragment.java @@ -150,8 +150,9 @@ public class ProfileDocumentsFragment } } - private void updateActionModeTitle() { + private void updateActionModeBar() { actionMode.setTitle(String.valueOf(getListAdapter().getSelectedMediaCount())); + setCorrectMenuVisibility(actionMode.getMenu()); } private void handleMediaMultiSelectClick(@NonNull DcMsg mediaRecord) { @@ -162,8 +163,7 @@ public class ProfileDocumentsFragment actionMode.finish(); actionMode = null; } else { - updateActionModeTitle(); - setCorrectMenuVisibility(actionMode.getMenu()); + updateActionModeBar(); } } @@ -277,7 +277,7 @@ public class ProfileDocumentsFragment return true; case R.id.menu_select_all: getListAdapter().selectAll(); - updateActionModeTitle(); + updateActionModeBar(); return true; } return false; diff --git a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java index 4539bdd81..6fa61d3da 100644 --- a/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java +++ b/src/org/thoughtcrime/securesms/ProfileGalleryFragment.java @@ -142,8 +142,9 @@ public class ProfileGalleryFragment } } - private void updateActionModeTitle() { + private void updateActionModeBar() { actionMode.setTitle(String.valueOf(getListAdapter().getSelectedMediaCount())); + setCorrectMenuVisibility(actionMode.getMenu()); } private void handleMediaMultiSelectClick(@NonNull DcMsg mediaRecord) { @@ -154,8 +155,7 @@ public class ProfileGalleryFragment actionMode.finish(); actionMode = null; } else { - updateActionModeTitle(); - setCorrectMenuVisibility(actionMode.getMenu()); + updateActionModeBar(); } } @@ -264,7 +264,7 @@ public class ProfileGalleryFragment return true; case R.id.menu_select_all: getListAdapter().selectAll(); - updateActionModeTitle(); + updateActionModeBar(); return true; } return false; From ea30678e33279c5df3e83859e476321380e3516c Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 10:41:15 +0200 Subject: [PATCH 153/169] update deltachat-core-rust to 'chore(release): prepare for 1.124.1' of 'v1.124.1' --- jni/deltachat-core-rust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index aa78e82fe..47dbac9b5 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit aa78e82fedb033738d0568c18778f3f11d69fd7e +Subproject commit 47dbac9b50808a240f6886b0323223384d62ab79 From 7f78a612c0d3ed37cd7d4cd7bf7ce0e2b3c4b770 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 12:25:39 +0200 Subject: [PATCH 154/169] update translations --- res/values-es/strings.xml | 8 ++++++++ res/values-sq/strings.xml | 8 ++++++++ res/values-tr/strings.xml | 10 +++++++++- res/values-zh-rCN/strings.xml | 8 ++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index f4a75d18d..b40a04c37 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -737,6 +737,9 @@ Símbolos Banderas + + Reacciones + Borrar mensajes antiguos Borrar mensajes del dispositivo @@ -931,6 +934,9 @@ Nombre y mensaje Solo nombre Sin nombre ni mensaje + Notificaciones deshabilitadas + + Permiso requerido Continuar @@ -938,6 +944,8 @@ Para enviar mensajes de audio, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Micrófono\". Para adjuntar o exportar fotos, videos o audio, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Almacenamiento\". Para adjuntar una ubicación, vaya al menú de configuración de aplicaciones, seleccione \"Permisos\" y habilite \"Ubicación\". + Para recibir notificaciones, vaya a \"Ajustes del sistema / Applicaciones / Delta Chat\" y active \"Notificaciones\". + Dibuja para difuminar Añadir texto diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index c06b03a8a..812874687 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -719,6 +719,9 @@ Simbole Flamuj + + Reagime + Fshiji mesazhet e vjetër Fshini mesazhe prej pajisjes @@ -913,6 +916,9 @@ Emër dhe mesazh Vetëm emër Pa emër apo mesazh + Njoftimet të çaktivizuara + + Lypset leje Vazhdo @@ -920,6 +926,8 @@ Delta Chat lyp leje mbi Mikrofonin që të mund të dërgojë mesazhe audio, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Mikrofonin\". Delta Chat lyp leje mbi Depozitimin që të mund të bashkëngjisë apo eksportojë foto, video ose audio, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Depozitimin\". Delta Chat lyp leje mbi Vendndodhjen që të mund të bashkëngjisë një vendndodhje, por kjo i është mohuar. Ju lutemi, vazhdoni te menuja e rregullimeve të aplikacionit, përzgjidhni \"Leje\", dhe aktivizojini për \"Vendndodhjen\". + Që të merrni njoftime, kaloni te “Rregullime Sistemi / Aplikacione / Delta Chat” dhe aktivizoni “Njoftime”. + Që të turbullohet, vizatoni kudo qoftë Shtoni tekst diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index f96df5046..3dfe212ed 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -41,7 +41,7 @@ Arşivleme Sessize Al Kaybolan İletiler - Onlar Delta Chat\'i kullanıyorsa, bu sohbetin tüm üyelerine uygulanır; onlar hâlâ iletileri kopyalayabilir, kaydedebilir ve iletebilir ya da diğer e-posta istemcilerini kullanabilir. + Bu sohbetin tüm üyelerine onlar Delta Chat\'i kullanıyorsa uygulanır; onlar hâlâ iletileri kopyalayabilir, kaydedebilir ve iletebilir ya da diğer e-posta istemcilerini kullanabilir. Kaydet Sohbet Ortam @@ -722,6 +722,9 @@ Semboller Bayraklar + + Tepkiler + Eski İletileri Sil İletileri Aygıttan Sil @@ -916,6 +919,9 @@ Ad ve ileti Yalnızca ad Ad ya da ileti yok + Bildirimler etkisizleştirildi + + İzin gerekli Sürdür @@ -923,6 +929,8 @@ Sesli iletiler göndermek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Mikrofon\"u etkinleştirin. Dosyalar almak ya da göndermek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Depolama\"yı etkinleştirin. Bir konum iliştirmek için uygulama ayarlarına gidin, \"İzinler\"i seçin ve \"Konum\"u etkinleştirin. + Bildirimler almak için \"Sistem Ayarları / Uygulamalar / Delta Chat\"e gidin ve \"Bildirimler\"i etkinleştirin. + Bulanıklaştırmak için herhangi bir yere çizin Metin Ekle diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 9782aeb98..feb6e5708 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -707,6 +707,9 @@ 符号 旗帜 + + 回应 + 删除旧消息 从设备删除消息 @@ -901,6 +904,9 @@ 名称和消息 仅名称 不显示名称或消息 + 已禁用通知 + + 需要权限 继续 @@ -908,6 +914,8 @@ 要发送音频消息,请转至应用设置,选择“权限”,然后启用“麦克风”。 要发送或接收文件,请转至应用设置,选择“权限”,然后启用“存储”。 要附加位置,请转至应用设置,选择“权限”,然后启用“位置”。 + 要接收通知,请转到“系统设置/应用/Delta Chat\"并开启”通知“。 + 对任意地方涂抹以进行模糊 添加文字 From b2ecce28499cc331cf0a6ad23bc201308258e01e Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 12:50:25 +0200 Subject: [PATCH 155/169] update local help --- assets/help/cs/help.html | 10 +- assets/help/de/help.html | 13 +- assets/help/en/help.html | 566 ++++++++++++++++++++---------------- assets/help/es/help.html | 10 +- assets/help/fr/help.html | 310 ++++++++------------ assets/help/id/help.html | 10 +- assets/help/it/help.html | 16 +- assets/help/nl/help.html | 14 +- assets/help/pl/help.html | 13 +- assets/help/pt/help.html | 10 +- assets/help/ru/help.html | 10 +- assets/help/sk/help.html | 10 +- assets/help/sq/help.html | 16 +- assets/help/uk/help.html | 13 +- assets/help/zh_CN/help.html | 13 +- 15 files changed, 555 insertions(+), 479 deletions(-) diff --git a/assets/help/cs/help.html b/assets/help/cs/help.html index 9f3fe913b..20ff62894 100644 --- a/assets/help/cs/help.html +++ b/assets/help/cs/help.html @@ -839,6 +839,9 @@ Pro ostatní programy by mělo jít nalézt řešení na Interentu.

    Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

    -
  • Private Apps / webxdc +
  • webxdc apps
  • Experimental Features
  • @@ -375,7 +379,7 @@ of a contact. It means they were “recently seen”.
  • because they wrote something to a group you are both a member of,
  • because they sent you a read receipt for a message you wrote,
  • or because they sent data to your Delta Chat app by using a -private app.
  • +webxdc app.
  • So this is not a real time online status - and if someone doesn’t answer @@ -534,199 +538,292 @@ this way, all messages will be deleted from your device as soon as they older than that.
  • -

    +

    - Encryption + Encryption and Security

    -

    +

    - Does Delta Chat support end-to-end-encryption? + Which standards are used for end-to-end encryption?

    -
      -
    • -

      Yes. Delta Chat implements the Autocrypt Level 1 standard and can -thus E2E-encrypt messages with other Autocrypt-capable apps.

      -
    • -
    • -

      Delta Chat also supports a strong form of end-to-end encryption that is -even safe against active attacks, see “verified groups” further below.

      -
    • -
    +

    Autocrypt is used for automatically +establishing E2E-encryption with contacts and group chats. +Autocrypt uses a limited and secure subset of the OpenPGP standard.

    + +

    Secure-Join protocols +are used to implement verified groups +which provide pervasive protection against network attacks and compromised servers. +Verified groups enforce all messages in a chat to be safely E2E-encrypted +with an unparalleled ease of use that avoids users having to learn about +public key cryptography, key management or key verification.

    -

    +

    - What do I have to do to activate the end-to-end-encryption? + When will messages be E2E-encrypted?

    -
      -
    • -

      Nothing.

      -
    • -
    • -

      Delta Chat apps (and other Autocrypt-compatible -e-mail apps) share the keys required for end-to-end-encryption automatically -as the first messages are sent. -After this, all subsequent messages are encrypted end-to-end automatically. -If one of the chat partners uses a non-Autocrypt e-mail app, subsequent -messages are not encrypted until an Autocrypt-compliant app is available again.

      -
    • -
    • -

      If you want to rather avoid end-to-end-encrypted e-mails by default, -use the corresponding Autocrypt setting in “Settings” or “Advanced settings”.

      -
    • -
    +

    After a first message was received from a Delta Chat or other Autocrypt-capable contact, +Delta Chat defaults to using E2E-encryption with that contact (and vice versa). +When creating a group chat with contacts where E2E-encrypted is individually in place, +all group members will automatically use E2E-encryption with each other and in the group. +However, if you add a contact that lacks E2E-encryption, +the group chat will not use E2E-encryption.

    + +

    If you want to be sure to always and only use E2E-encryption in a group +use verified chat groups +which additionally protects against compromised or malfeasant e-mail servers.

    -

    +

    - If end-to-end-encryption is not available, is the connection not encrypted at all? + Are attachments (pictures, files, audio etc.) E2E-encrypted?

    -
      -
    • With most mail servers, Delta Chat establishes transport encryption -(TLS). -This only secures the connection between your device and your e-mail -server. Whereas e2e-encryption provides safety between -your device and a friend’s device.
    • -
    +

    Yes. +When we talk about an “E2E-encrypted message” +we always mean a whole message is encrypted, +including all the attachments +and attachment metadata such as filenames.

    -

    +

    - How can I verify cryptographic status with a sender? + Is OpenPGP secure?

    -

    If you are within immediate distance of the chat partner:

    +

    Yes, Delta Chat uses a secure subset of OpenPGP +and only displays a padlock security indicator on a message +if the whole message is properly encrypted and signed. +For example, “Detached signatures” are not treated as secure.

    + +

    OpenPGP is not insecure by itself. +Most publically discussed OpenPGP security problems +actually stem from bad usability or bad implementations of tools or apps (or both). +It is particularly important to distinguish between OpenPGP, the IETF encryption standard, +and GnuPG (GPG), a command line tool implementing OpenPGP. +Many public critiques of OpenPGP actually discuss GnuPG which Delta Chat has never used. +Delta Chat rather uses the OpenPGP Rust implementation rPGP, +available as an independent “pgp” package, +and security-audited in 2019.

    + +

    We aim, along with other OpenPGP implementors, +to further improve security characteristics by implementing the +new IETF OpenPGP Crypto-Refresh +which was thankfully adopted in summer 2023.

    + +

    + + + Did you consider using alternatives to OpenPGP for E2E-encryption? + + +

    + +

    Yes, we are following efforts like MLS +or Saltpack +but adopting them would mean breaking E2E-encryption interoperability +with all other e-mail apps that typically support OpenPGP encryption. +So it would not be a light decision to take +and there must be tangible improvements for users.

    + +

    Delta Chat takes a holistic “usable security” approach +and works with a wide range of activist groupings as well as +renowned researchers such as TeamUSEC +to improve actual user outcomes against security threats. +The wire protocol and standard for establishing E2E-encryption is +only one part of “user outcomes”, +see also our answers to device-seizure +and message-metadata questions.

    + +

    + + + Is Delta Chat vulnerable to EFAIL? + + +

    + +

    No, Delta Chat never was vulnerable to EFAIL +because its OpenPGP implementation rPGP +uses Modification Detection Code when encrypting messages +and returns an error +if the Modification Detection Code is incorrect.

    + +

    Delta Chat also never was vulnerable to the “Direct Exfiltration” EFAIL attack +because it only decrypts multipart/encrypted messages +which contain exactly one encrypted and signed part, +as defined by the Autocrypt Level 1 specification.

    + +

    + + + Is a message exposed in cleartext if E2E-encryption is not available? + + +

    + +

    No, +this does not necessarily mean that the message is exposed in cleartext.

    + +

    Delta Chat always uses (TLS) encryption +which secures connections between your device and your e-mail provider +unless you explicitly disable it. +All of Delta Chat’s TLS-handling has been independently security audited.

    + +

    Moreover, the connection between your and the recipient’s e-mail provider +will today typically be transport-encrypted as well. +If the involved e-mail servers support MTA-STS +then transport encryption will be enforced in all inter e-mail server communications +in which case Delta Chat communications will never be exposed in cleartext to the network +even if the message was not E2E-encrypted.

    + +

    Note that maintaining E2E-encryption on top of TLS encryption is highly advisable +because it provides safety between your device and a contact’s device, +irrespective of any hops over potentially compromised e-mail servers.

    + +

    + + + How does Delta Chat protect metadata in messages? + + +

    + +

    Delta Chat protects most message metadata by putting the following information +into the E2E-encrypted part of messages:

      -
    • Select QR Invite code on one device and then Scan QR code -on the other one and scan the code. If both devices are online, -they will introduce a chat channel with each-other (if it doesn’t exist already) -and the encryption keys will also be verified. Both will see a -“sender verified” system message in their 1:1 chat.
    • +
    • Subject line
    • +
    • Group avatar and name
    • +
    • MDN (read receipt) requests (Chat-Disposition-Notification-To)
    • +
    • Disappearing message timer (Ephemeral-Timer)
    • +
    • Chat-Group-Member-Removed, Chat-Group-Member-Added
    • +
    • Secure-Join header containing secure join commands
    • +
    • Notification about enabling location streaming
    • +
    • WebRTC room URL
    -

    If you are not near the chat partner, you can check the status manually in the “Encryption” dialog -(user profile on Android/iOS or right-click a user’s chat-list item on desktop):

    +

    E-Mail servers do not get access to this protected metadata +but they do see the message date as well as the message size, +and, more importantly, the sender and receiver addresses. +E-mail servers need receiver addresses to route and +deliver messages to recipient’s devices.

    + +

    + + + How to protect metadata and contacts when a device is seized? + + +

    -
      -
    • -

      For end-to-end-encryption, Delta Chat shows two fingerprints there. -If the same fingerprints appear on your chat partner’s device, +

      Both for protecting against metadata-collecting e-mail servers +as well as against the threat of device seizure +we recommend to use a Delta Chat optimized e-mail server instance +to create pseudonymous temporary accounts through QR-code scans. +Note that Delta Chat apps on all platforms support multiple accounts +so you can easily use action-specific “1-week” or “1-month” accounts next to your “main” account +with the knowledge that all temporary account data, along with all metadata, will be deleted. +Moreover, if a device is seized then contacts using temporary e-mail accounts +can not be identified easily, as compared to messengers which reveal +phone numbers in chat groups which in turn are often associated with passport identities.

      + +

      + + + How can I verify E2E-security with a contact? + + +

      + +

      If you are within immediate distance of your contact, +select QR Invite code on one device and then Scan QR code +from within Delta Chat on the other device. +If both devices are online, +they will setup a chat with each-other (if it doesn’t exist already) +and both will see a “sender verified” system message in their chat. +Showing and scanning a QR code can also happen in any “second channel” +such as a video call or another messenger.

      + +

      If QR code scanning is for some reason not viable, +you may check the E2E encryption status manually in the “Encryption” dialog +(user profile on Android/iOS or right-click a user’s chat-list item on desktop). +Delta Chat shows two fingerprints there. +If the same fingerprints appear on your own and your contact’s device, the connection is safe.

      -
    • -
    • -

      For transport encryption, this state is just shown there

      -
    • -
    -

    +

    - How can I check the encryption of messages? + How can I check the encryption status of messages?

    -
      -
    • -

      A little padlock shown beside a message denotes whether the message is end-to-end-encrypted from from the given sender.

      -
    • -
    • -

      If there is no padlock, the message is usually transported unencrypted e.g. because you or the sender have turned off end-to-end-encryption, or the sender uses an app without support for end-to-end-encryption.

      -
    • -
    +

    A little padlock in a message bubble denotes +that the message was properly E2E-encrypted from the given sender. +If there is no padlock, the message was not properly E2E-encrypted +most likely because the sender uses an app or webmail interface +without support for E2E–encryption.

    -

    +

    - How can I ensure message encryption and deletion? + Why do I see unencrypted messages? + + +

    + +

    If a contact uses a non-Autocrypt e-mail app, +all messages involving this contact (in a group or 1:1 chat) +will not be E2E-encrypted, and thus not show a “padlock” with messages. +Note that even if your contacts use Delta Chat on their account, +they might also use a non-Autocrypt e-mail app on that account +which then may cause intermittently unencrypted messages. +Replying unencrypted to unencrypted messages is mandated by Autocrypt +to prevent unreadable messages on the side of your contacts +and their non-Autocrypt e-mail app.

    + +

    If you need a safely E2E-encrypted chat with contacts +who are using their account also with Autocrypt-incapable apps (e.g. webmail) +it’s best to create a verified group chat with them. +Any message sent into a verified group chat will be E2E-encrypted +irrespective of the last incoming message from a contact.

    + +

    + + + How can I ensure message E2E-encryption and deletion?

    The best way to ensure every message is encrypted, and metadata deleted as quickly as possible -is creating a verified group and turning on -disappearing messages.

    +is using verified groups +and turning on disappearing messages.

    -

    Verified groups are always encrypted and protected against MITM -attacks.

    +

    Verified groups are always encrypted and protected against MITM attacks +and turning on “disappearing messages” deletes the messages +on the server after a user-configured time.

    -

    Metadata can’t be encrypted, as the server needs to know where to deliver your -messages. But turning on “disappearing messages” deletes the messages on -the server after they were delivered.

    - -

    If you need the messages on your device, but not on the server, you can also -agree in the group to turn on “delete messages from server -automatically”.

    - -

    If you want to protect a 1:1 conversation like this, you should create a -verified group with only 2 people. If the other person loses their device but -not their account, you can still communicate in the 1:1 chat. (Read more)

    - -

    - - - Which standards are used for end-to-end-encryption? - - -

    - -
      -
    • -

      Autocrypt is used for establishing -e2e-encryption with other Delta Chat and other Autocrypt-capable mail apps. -Autocrypt uses a limited subset of OpenPGP functionality.

      -
    • -
    • -

      Delta Chat implements countermitm setup-contact and verified-group protocols to achieve protection against active network attacks. This goes beyond the opportunistic -base protection of Autocrypt Level 1, while maintaining its ease of use.

      -
    • -
    - -

    - - - What is the difference between verified groups and 1:1 chats with verified contacts? - - -

    - -
      -
    • -

      1:1 chats with a verified contact and verified groups are not the same, even -if there are only 2 people in the verified group. One difference is that you -could easily add more people to the group, but there are other implications as -well.

      -
    • -
    • -

      Verified groups are invariably secured. Any breakage (cleartext or wrongly -signed messages etc.) will be flagged and such messages will not be shown in -this chat. You can trust all messages in this verified-checkmark chat to have -not been read/altered by middle parties.

      -
    • -
    • -

      1:1 chats are opportunistic, it is meant to allow people to communicate no -matter if they change e-mail clients, devices, setups etc. That’s why there -is no verification checkmark, even if you have verified the contact.

      -
    • -
    +

    If you don’t need a longer-lived copy of your messages on the server, +you can also turn on “delete messages from server automatically”.

    @@ -736,57 +833,23 @@ is no verification checkmark, even if you have verified the contact.

    -
      -
    • -

      No, OpenPGP doesn’t support Perfect Forward Secrecy. Perfect Forward Secrecy -works session-oriented, but E-Mail is asynchronous by nature -and often used from multiple devices independently. This means that if your -Delta Chat private key is leaked, and someone has a record -of all your in-transit messages, they will be able to read them.

      -
    • -
    • -

      Note that if anyone has seized or hacked your running phone, they will -typically be able to read all messages, no matter if Perfect Forward Secrecy -is in place or not. Having access to a single device from a member of a group, -will typically expose a lot of the social graph. Using e-mail addresses that -are not easily tracked back to persons helps group members to stay safer from -the effects of device seizure.

      -
    • -
    • -

      We are sketching ways to protect communications better against the event -of device seizure.

      -
    • -
    - -

    - - - How does Delta Chat protect my Metadata? - - -

    +

    No, Delta Chat doesn’t support Perfect Forward Secrecy (PFS). +This means that if your Delta Chat private decryption key is leaked, +and someone has collected your prior in-transit messages, +they will be able to decrypt and read them using the leaked decryption key.

    -
      -
    • -

      As Delta Chat is a decentralized messenger, the metadata of Delta Chat users -are not stored on a single central server. However, they are stored on the mail -servers of the sender and the recipient of a message.

      -
    • -
    • -

      Each mail server currently knows about who sent and who received a message by -inspecting the unencrypted To/Cc headers and thus determine which e-mail addresses -are part of a group. Delta Chat itself could avoid unencrypted To/Cc headers quite -and always put them only into the encrypted section. See -Avoid sending To/CC headers for verified groups. -For opportunistic chats the main concern is how it affects other mail apps who -might participate in chats.

      -
    • -
    • -

      Many other e-mail headers, in particular the “Subject” header, are -end-to-end-encryption protected, see also this upcoming IETF -RFC.

      -
    • -
    +

    Note, however, that if anyone obtains to your decryption keys, +they will typically also be able to obtain your messages, +irrespective if Perfect Forward Secrecy is in place or not. +The typical real-world situation for leaked decryption keys is device seizure +which we discuss in our answer on metadata and device seizure.

    + +

    It is possible that Delta Chat evolves to support Perfect Forward Secrecy, +because OpenPGP is just a container for encrypted messages +but encryption key management (and thus key rotation or key “ratcheting”) +could be organized in flexible ways. +See Seqouia’s PFS prototype +for existing experiments in the OpenPGP implementor community.

    @@ -796,14 +859,12 @@ RFC.

    -
      -
    • -

      Yes. The best way is to send an Autocrypt Setup Message from the other e-mail client. Look for something like Start Autocrypt Setup Transfer in the settings of the other client and follow the instructions shown there.

      -
    • -
    • -

      Alternatively, you can import the key manually in “Settings -> Advanced settings -> Import secret keys”. Caution: Make sure the key is not protected by a password, or remove the password beforehand.

      -
    • -
    +

    Yes. +The best way is to send an Autocrypt Setup Message from the other e-mail client. +Look for something like Start Autocrypt Setup Transfer in the settings of the other client and follow the instructions shown there.

    + +

    Alternatively, you can import the key manually in “Settings -> Advanced settings -> Import secret keys”. +Caution: Make sure the key is not protected by a password, or remove the password beforehand.

    If you don’t have a key or don’t even know you would need one - don’t worry: Delta Chat generates keys as needed, you don’t have to hit a button for it.

    @@ -853,6 +914,9 @@ For other programs, you should be able to find a solution online.

    Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

      +
    • +

      Make sure both devices are on the same Wi-Fi or network

      +
    • On the first device, go to Settings → Add Second Device, unlock the screen if needed and wait a moment until a QR code is shown

      @@ -1008,62 +1072,63 @@ Otherwise, deleting messages or multi-device setups might not work properly.

      - Private Apps / webxdc + webxdc apps

      -

      In Delta Chat, you can share “private apps”, attachments with an .xdc file +

      In Delta Chat, you can share webxdc apps, attachments with an .xdc file extension. They can do very different things, and make Delta Chat a truly -extendable messenger. The technical term is webxdc.

      +extendable messenger.

      -

      +

      - How private are private apps? + How private are webxdc apps?

        -
      • Private apps can not send data to the Internet, or download anything.
      • -
      • A private app can only exchange data within a Delta Chat chat, with its +
      • webxdc apps can not send data to the Internet, or download anything.
      • +
      • A webxdc app can only exchange data within a Delta Chat chat, with its copies on the devices of your chat partners. Other than that, it’s completely isolated from the Internet.
      • -
      • The privacy a private app offers is the privacy of your chat - as long as you -trust the people you chat with, you can trust the private app as well.
      • -
      • This also means: it can be a privacy risk to open private apps in chats where +
      • The privacy a webxdc app offers is the privacy of your chat - as long as you +trust the people you chat with, you can trust the webxdc app as well.
      • +
      • This also means: it can be a privacy risk to open webxdc apps in chats where you don’t trust the members - as you know it from e-mail attachments, where you only open attachments from senders you trust, and not from spammers.
      -

      +

      - Where can I get private apps? + Where can I get webxdc apps?

        -
      • In general, there is no curated appstore and Delta Chat is not responsible -for private apps or their content. Anyone can share private apps with each +
      • In general, anyone can share webxdc apps with each other without restrictions.
      • -
      • You can find some example apps on webxdc.org.
      • -
      • Many people write their own private apps and post them to the Delta Chat +
      • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
      • +
      • Many people write their own webxdc apps and post them to the Delta Chat forum.
      -

      +

      - How can I create my own private apps? + How can I create my own webxdc apps?

        -
      • Private apps are just zip files containing html, css, and javascript code.
      • +
      • webxdc apps are just zip files containing html, css, and javascript code.
      • You can extend the Hello World example app to get started.
      • All else you need to know is written in the @@ -1107,31 +1172,32 @@ link in the settings.
      • this way, you will have a new random jitsi room every time you call someone.
      -

      +

      - What is a verified group? Why is it experimental? + What is a verified group? Why is it experimental?

      -
        -
      • -

        A verified group is a chat that guarantees safety against an active -attacker. All Messages in a verified chat view are e2e-encrypted, and -members can join by scanning a “QR invite code”. All members are thus -connected with each other through a chain of invites, which guarantee -cryptographic consistency against active network or provider attacks. +

        Verified groups carry a green verification checkmark in the group title that guarantees +that all messages are E2E-encrypted and can not be read or altered by e-mail servers. +Each member in a verified group chat can add already verified contacts +or tap “QR Invite code” to let invitees scan the code to get verified and added (“secure-join”). +This “secure-join” protocol ensures that all verified group chat members +are connected with each other through a chain of verifications (“web of trust”), +guaranteeing E2E-encryption consistency even if e-mail servers are compromised or malfeasant. See countermitm.readthedocs.io -for the R&D behind this feature.

        -
      • -
      • -

        As of Oct 2022, “verified groups” remain an experimental feature. It is -continuously improved and many bugs have been fixed since the original -introduction in 2018. However, there remain cases, especially with large -groups where inconsistencies can occur, or messages become unreadable.

        -
      • -
      +for a detailed security discussion.

      + +

      Note that “1:1” chats are currently only opportunistically encrypted (Autocrypt). +You need to create a verified group with your contact +to ensure that all messages will be safely E2E-encrypted between you two. +We plan to introduce verified 1:1 chats around the end of 2023, +simplifying and extending the guarantees of verified E2E-encryption for all chat types. +Until then verified groups will remain classified as an experimental feature +although they are widely and successfully used already, +and reported bugs have been continously fixed in the last years.

      @@ -1343,10 +1409,10 @@ uses.

    • See Standards used in Delta Chat.
    -

    +

    - Was Delta Chat independently audited for security vulnerabilities? + Was Delta Chat independently audited for security vulnerabilities?

    diff --git a/assets/help/es/help.html b/assets/help/es/help.html index df850c05e..aecea3c28 100644 --- a/assets/help/es/help.html +++ b/assets/help/es/help.html @@ -843,6 +843,9 @@ For other programs, you should be able to find a solution online.

    Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

  • Groupes @@ -35,7 +35,7 @@
  • Si le chiffrement de bout en bout n’est pas disponible, la connexion n’est-elle pas chiffrée du tout ?
  • Comment puis-je vérifier le statut de chiffrement auprès d’un expéditeur ?
  • Comment puis-je vérifier le chiffrement des messages ?
  • -
  • Comment puis-je faire en sorte que les messages soient chiffrés et supprimés ?
  • +
  • Comment m’assurer que les messages sont chiffrés et supprimés ?
  • Quels standards sont utilisés pour le chiffrement de bout en bout ?
  • Quelle est la différence entre des groupes vérifiés et des discussions à deux avec des contacts vérifiés ?
  • Delta Chat prend-il en charge la confidentialité persistante parfaite (Perfect Forward Secrecy) ?
  • @@ -57,20 +57,20 @@
  • Applications privées / webxdc
  • Fonctionnalités expérimentales
  • Divers @@ -80,8 +80,8 @@
  • Si Delta Chat se base sur le courrier électronique, est-ce vraiment une messagerie instantanée?
  • Delta Chat est-il compatible avec Protonmail / Tutanota / Criptext ?
  • Les détails techniques m’intéressent. Pouvez-vous m’en dire plus ?
  • -
  • Was Delta Chat independently audited for security vulnerabilities?
  • -
  • Comment est financé le développement de Delta Chat?
  • +
  • Est-ce qu’un audit indépendant des failles de sécurité a été réalisé sur Delta Chat ?
  • +
  • Comment est financé le développement de Delta Chat ?
  • @@ -141,12 +141,12 @@

    Par défaut, Delta Chat affiche tous les courriels.

    -

    Vous pouvez changer cette préférence en allant dans “Paramètres -> Discussions & fichiers multimédia -> Voir les courriels classiques”. Trois options sont disponibles :

    +

    Vous pouvez changer cette préférence en vous rendant dans vos “Paramètres -> Discussions & fichiers multimédia -> Voir les courriels classiques”. Trois options sont disponibles :

    • “Non, seulement les discussions”: vous verrez seulement les messages envoyés par d’autres utilisateurs de Delta Chat et les réponses à vos messages Delta Chat. Cette option est recommandée si vous utilisez le même compte pour recevoir aussi des courriels normaux.
    • “Tout”: vous verrez dans Delta Chat tous les courriels envoyés à votre adresse. Cette option est recommandée si vous souhaitez utiliser Delta Chat pour tous vos courriels, afin de ne rater aucun message.
    • -
    • “Pour les contacts acceptés”: vous verrez dans Delta Chat tous les courriels envoyés par les personnes avec qui vous avez déjà ouvert une discussion, mais les notifications de nouvelles conversations ne s’afficheront que pour des messages envoyés via Delta Chat. Cette option vous permet de décider au cas par cas si vous souhaitez échanger via Delta Chat ou via une application de courriel “normale”.
    • +
    • “Pour les contacts acceptés”: vous verrez dans Delta Chat tous les courriels envoyés par les personnes avec qui vous avez déjà ouvert une discussion, mais les notifications de nouvelles conversations ne s’afficheront que pour des messages envoyés via Delta Chat. Cette option vous permet de décider au cas par cas si vous souhaitez échanger via Delta Chat ou via une application de courriel “classique”.

    @@ -179,21 +179,21 @@ recevoir de messages de cette personne, nous vous conseillons de la bloquer<

    Oui. En plus du texte brut, toutes les pièces jointes aux courriels sont affichées sous forme de messages séparés. Les messages sortants expédient automatiquement les pièces jointes que vous ajoutez.

      -
    • Pour de meilleures performances, les images sont optimisées et envoyées en taille réduite par défaut, mais vous pouvez les envoyer en tant que “fichier” pour en conserver la taille originale.
    • +
    • Pour améliorer les performances, les images sont redimensionnées et envoyées en taille réduite par défaut ; mais vous pouvez les envoyer en tant que “fichier” pour en conserver la taille originale.

    - Comment naviguer entre mes différents comptes et comment en ajouter ? + Comment naviguer entre plusieurs comptes et comment en ajouter ?

    -

    Vous pouvez facilement gérer des comptes supplémentaires sur les clients Delta Chat mobile ou de bureau en cliquant sur :

    +

    Vous pouvez facilement gérer des comptes supplémentaires sur les clients Delta Chat mobile ou de bureau en cliquant :

      -
    • le bouton du menu, puis sur “Changer de compte” (Android et bureau) ;
    • -
    • l’icône de profil, puis sur “Ajouter un compte” (iOS).
    • +
    • soit sur le bouton du menu, puis sur “Changer de compte” (Android et PC) ;
    • +
    • soit sur l’icône de profil, puis sur “Ajouter un compte” (iOS).

    Peut-être voudrez-vous aussi savoir comment ajouter un compte sur plusieurs appareils.

    @@ -340,41 +340,31 @@ pour mettre une discussion en sourdine, ouvrez le menu de la conversation (Andro

      -
    • Depuis la version 1.34 de Delta Chat, vous voyez parfois un “point vert” à côté de la photo de profil -d’un contact. Cela signifie qu’il a été “vu récemment”.
    • +
    • Depuis la version 1.34 de Delta Chat, vous voyez parfois un “point vert” à côté de la photo de profil d’un contact. Cela signifie qu’il a été “vu récemment”.
    • Plus précisément, cela signifie que Delta Chat a détecté l’activité de ce contact au cours des 10 dernières minutes :
      • soit parce qu’il vous a écrit personnellement ;
      • soit parce qu’il a écrit dans un groupe dont vous êtres tous les deux membres ;
      • -
      • soit parce qu’il a envoyé l’accusé de lecture d’un message que vous lui avez écrit ;
      • -
      • ou bien parce qu’il a envoyé des données à votre appli Delta Chat via une -appli privée.
      • +
      • soit parce qu’il a renvoyé l’accusé de lecture d’un message que vous lui avez écrit ;
      • +
      • ou bien parce qu’il a envoyé des données à votre appli Delta Chat via une appli privée.
    • -
    • Le “point vert” n’est donc pas un statut en temps réel. Aussi, si quelqu’un ne vous répond pas -immédiatement alors qu’il semble être en ligne, ne vous en faites pas et -patientez ;-)
    • -
    • D’un autre côté, les autres ne vous voient pas forcément “en ligne”. En particulier, - si vous avez désactivé les accusés de lecture, ils ne verront pas de point vert -tant que vous ne leur écrivez pas directement ou n’écrivez pas dans un groupe dont ils font aussi partie.
    • +
    • Le “point vert” n’est donc pas un statut en temps réel. Aussi, si quelqu’un ne vous répond pas immédiatement alors qu’il semble être en ligne, ne vous inquiétez pas et donnez-lui du temps ;-)
    • +
    • D’un autre côté, vos contacts ne vous voient pas forcément “en ligne”. Si vous avez désactivé les accusés de lecture, ils ne verront pas de point vert tant que vous ne leur écrivez pas directement ou n’écrivez pas dans un groupe dont ils font aussi partie.
    -

    +

    - How can I delete my account? + Comment supprimer mon compte ?

    -

    As you use an e-mail account for Delta Chat, -how you can delete your account depends on your e-mail provider. -We don’t have any control over your e-mail account, -so unfortunately we can’t help you with that.

    +

    Étant donné que vous utilisez Delta Chat à travers un compte courriel, la façon dont vous pouvez supprimer votre compte dépend de votre fournisseur de courriel. +Comme nous n’exerçons aucun contrôle sur votre compte courriel, nous ne sommes pas en mesure de vous aider à le supprimer.

    -

    If you want to keep the account, -but uninstall Delta Chat, -it is recommended to leave any group chat before uninstalling Delta Chat.

    +

    Si vous souhaitez conserver votre compte mais désinstaller Delta Chat, nous vous recommandons de quitter toutes les discussions de groupe avant de procéder à la désinstallation.

    @@ -470,15 +460,15 @@ qu’un humain a lu ou compris le message ;)
    • -

      Par défaut, Delta Chat stocke tous les messages sur votre appareil. Vous pouvez donc choisir de supprimer les anciens messages automatiquement pour libérer de l’espace de stockage chez votre fournisseur de courriel. Ces messages seront conservés localement jusqu’à ce que vous les supprimiez aussi de votre appareil.

      +

      Par défaut, Delta Chat stocke tous les messages sur votre appareil. Vous pouvez donc configurer Delta Chat pour qu’il supprime automatiquement les anciens messages reçus, si vous souhaitez libérer de l’espace de stockage chez votre fournisseur de courriel. Ces messages seront conservés localement jusqu’à ce que vous les supprimiez aussi de votre appareil.

    • -

      Pour activer cette option, allez dans les paramètres de “Discussions et fichiers multimédia” et Supprimer les anciens messages → Supprimer les messages du serveur. +

      Pour activer cette option, accédez à vos paramètres de “Discussions et fichiers multimédia”, puis à Supprimer les anciens messages → Supprimer les messages du serveur. Vous pouvez régler un délai allant de “Immédiatement” à “Après 1 année”. Tous les courriels reçus sur Delta Chat seront supprimés du serveur une fois le délai écoulé.

    • -

      Attention : si vous utilisez Delta Chat sur plusieurs appareils, laissez les messages sur le serveur jusqu’à ce que l’(es) autre(s) appareil(s) ai(en)t pu les télécharger aussi. Dans ce cas, nous vous conseillons de paramétrer la suppression automatique sur “Après 1 jour” ou plus, en fonction de la fréquence à laquelle vous vous servez de ces autres appareils.

      +

      Attention : si vous utilisez Delta Chat sur plusieurs appareils, vous devez laisser vos messages sur le serveur suffisamment longtemps pour permettre à votre/vos autre(s) appareil(s) de les télécharger aussi.

    @@ -593,15 +583,15 @@ Ce type de connexion sécurise les échanges seulement entre votre appareil et v -

    +

    - Comment puis-je faire en sorte que les messages soient chiffrés et supprimés ? + Comment m’assurer que les messages sont chiffrés et supprimés ?

    -

    La meilleure façon de garantir que chaque message soit chiffré et les métadonnées effacées aussi vite que possible c’est de créer un groupe vérifié et d’activer les messages éphémères.

    +

    Créer un groupe vérifié et activer les messages éphémères constitue le meilleur moyen de garantir que chaque message est chiffré et les métadonnées effacées aussi tôt que possible.

    Les groupes vérifiés sont toujours chiffrés et protégés contre les attaques de l’homme du milieu.

    @@ -609,7 +599,7 @@ Ce type de connexion sécurise les échanges seulement entre votre appareil et v

    Si vous avez besoin de conserver vos messages sur votre appareil, mais pas sur le serveur, vous pouvez aussi vous mettre d’accord dans le groupe pour activer l’option “Supprimer les messages du serveur immédiatement”.

    -

    Si vous souhaitez protéger une conversation à deux de cette manière, nous vous conseillons de créer un groupe vérifié avec seulement deux personnes. Si jamais l’autre personne perdait son appareil, mais pas son compte, vous pourriez toujours communiquer dans la conversation à deux. (En savoir plus)

    +

    Si vous souhaitez protéger une discussion à deux de cette manière, nous vous conseillons de créer un groupe vérifié avec seulement deux personnes. Si jamais l’autre personne perdait son appareil mais pas son compte, vous pourriez toujours communiquer dans la conversation à deux. (En savoir plus)

    @@ -750,6 +740,9 @@ Pour les autres programmes, vous devriez pouvoir trouver la solution en ligne.Oui. Delta Chat 1.36 propose une nouvelle fonctionnalité expérimentale pour utiliser le même compte sur plusieurs appareils.

      +
    • +

      Make sure both devices are on the same Wi-Fi or network

      +
    • Sur le premier appareil, allez dans Paramètres → Ajouter un deuxième appareil, déverrouillez l’écran si nécessaire, et patientez un peu jusqu’à ce qu’un code QR s’affiche.

    • @@ -794,8 +787,8 @@ Ne quittez pas Delta Chat ! (Nous faisons de notre mieux pour que l’application fonctionne en arrière-plan, mais les systèmes ont une fâcheuse tendance à tuer les applis.)

    • -

      Delta Chat est déjà connecté sur l’appareil de destination. -Vous pouvez utiliser plusieurs comptes sur tous vos appareils : ajoutez un nouveau compte.

      +

      Si Delta Chat est déjà connecté sur l’appareil de destination. +Vous pouvez utiliser plusieurs comptes par appareil : ajoutez un nouveau compte.

    • Si les problèmes persistent, ou si vous ne pouvez pas scanner de code QR, essayez la méthode de transfert manuel décrite ci-dessous.

      @@ -884,10 +877,10 @@ Sinon, la suppression de messages dans une configuration multi-appareils pourrai

      Dans Delta Chat, vous pouvez partager des “applications privées” : ce sont des pièces jointes avec une extension de fichier .xdc. Elles possèdent des fonctionnalités très variées et peuvent faire de Delta Chat une messagerie vraiment extensible. En jargon technique, on parle de webxdc.

      -

      +

      - Dans quelle mesure les applications privées sont-elles privées ? + À quel point les applications privées sont-elles privées ?

      @@ -896,7 +889,7 @@ Sinon, la suppression de messages dans une configuration multi-appareils pourrai
    • Les applications privées ne peuvent ni envoyer des données sur internet ni télécharger quoi que ce soit.
    • Une application privée peut échanger des données uniquement au sein d’une discussion Delta Chat, ainsi qu’avec les copies sur les différents appareils des autres membres de la discussion. En dehors de cela, l’appli privée est complètement isolée d’internet.
    • La confidentialité offerte par une application privée est celle de votre discussion : si vous faites confiance aux personnes avec qui vous discutez, vous pouvez aussi vous fier à l’application privée.
    • -
    • Cela signifie aussi qu’ouvrir des applications privées dans des discussions où se trouvent des membres à qui vous ne faites pas confiance peut représenter un risque en matière de confidentialité. En fait, c’est la même situation qu’avec les courriels : vous ouvrez uniquement les pièces jointes envoyées par une adresse que vous connaissez et pas celles envoyées par un émetteur malveillant.
    • +
    • Cela signifie aussi qu’ouvrir des applications privées dans des discussions où se trouvent des membres à qui vous ne faites pas confiance peut représenter un risque en matière de confidentialité. En fait, la situation est la même qu’avec les courriels : vous ouvrez uniquement les pièces jointes envoyées par une adresse que vous connaissez et pas celles contenues dans les pourriels.

    @@ -908,9 +901,13 @@ Sinon, la suppression de messages dans une configuration multi-appareils pourrai

      -
    • De manière générale, il n’existe aucun magasin d’applications présélectionnées et Delta Chat n’est pas responsable des applications privées ou de leur contenu. Tout le monde peut partager des applications privées avec n’importe qui, sans restrictions.
    • -
    • Vous trouverez des exemples d’applications sur webxdc.org.
    • -
    • Beaucoup de gens développent leurs propres applications privées et les postent ensuite sur le forum Delta Chat.
    • +
    • In general, anyone can share private apps with each +other without restrictions.
    • +
    • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
    • +
    • Many people write their own private apps and post them to the Delta Chat +forum.

    @@ -938,20 +935,20 @@ Sinon, la suppression de messages dans une configuration multi-appareils pourrai

    Nous apprécions tout particulièrement les retours sur ces fonctionnalités. Vous voulez donner votre avis ? Rejoignez-nous sur le Forum pour contribuer. (Vous aimez faire des expériences ? Inscrivez-vous en cliquant sur “Sign up -> with Delta Chat” !)

    -

    +

    - Comment utiliser les appels audio/vidéo avec Delta Chat ? + Comment passer des appels audio/vidéo avec Delta Chat ?

      -
    • Pour activer les appels audio/vidéo, allez dans la section “Fonctionnalités expérimentales” des paramètres avancés et choisissez une “instance de discussion vidéo”.
    • +
    • Pour activer les appels audio/vidéo, accédez à la section “Fonctionnalités expérimentales” des paramètres avancés et choisissez une “instance de discussion vidéo”.
    • Quand vous invitez d’autres personnes dans une discussion vidéo, elle s’ouvre automatiquement dans votre application/navigateur et les destinataires reçoivent un courriel contenant un lien vers votre salon Jitsi/BBB. De cette manière, même les personnes n’utilisant pas Delta Chat peuvent participer.
    • Veuillez noter qu’il n’y a pas de sonnerie pour les destinataires, qui ne sont donc pas dérangé⋅e⋅s par votre invitation à une discussion vidéo.
    • Vous pouvez utiliser n’importe quel service de discussion vidéo permettant de rejoindre un salon par un lien. Il vous suffit de renseigner le lien dans vos paramètres.
    • -
    • Par exemple, pour utiliser l’instance Jitsi Meet principale, vous pouvez insérer :https://meet.jit.si/$ROOM. La variable$ROOMest une valeur aléatoire pour que vous puissiez rejoindre un nouveau salon Jitsi choisi au hasard à chaque nouvel appel.
    • +
    • Par exemple, pour utiliser l’instance Jitsi Meet principale, vous pouvez insérer :https://meet.jit.si/$ROOM. La variable$ROOMest une valeur aléatoire qui vous permet de rejoindre un nouveau salon Jitsi choisi au hasard à chaque nouvel appel.

    @@ -964,11 +961,11 @@ Sinon, la suppression de messages dans une configuration multi-appareils pourrai
    • -

      Un groupe vérifié est une discussion qui garantit une sécurité contre un attaquant actif. Tous les messages d’une discussion vérifiée sont chiffrés de bout en bout (e2ee), et les membres peuvent joindre en scannant un code barre à deux dimensions (QR code) d’invitation. Tous les membres sont alors connectés l’un à l’autre à travers une chaîne d’invitation, qui garanti une cohérence cryptographique contre des attaques réseaux actives ou des fournisseurs. -Consultez countermitm.readthedocs.io pour en savoir plus sur la R&D derrière cette fonctionnalité.

      +

      Un groupe vérifié est une discussion qui garantit une sécurité contre un attaquant actif. Tous les messages d’une discussion vérifiée sont chiffrés de bout en bout (E2E), et les membres peuvent rejoindre le groupe en scannant un code QR d’invitation. Tous les membres sont alors connectés les uns avec autres à travers une chaîne d’invitation, qui garantit une cohérence cryptographique contre des attaques de réseaux actifs ou des fournisseurs. +Consultez countermitm.readthedocs.io pour en savoir plus sur la recherche et le développement qui se trouvent derrière cette fonctionnalité.

    • -

      En octobre 2022, nous avons décidé que la fonctionnalité “groupes vérifiés” restait expérimentale, bien qu’elle soit améliorée en permanence et que de nombreux bugs aient été réparés depuis sa mise en place en 2018. En effet, certaines erreurs persistent, en particulier avec les groupes très larges, et les messages deviennent parfois illisibles.

      +

      Depuis octobre 2022, la fonctionnalité “groupes vérifiés” reste expérimentale, bien qu’elle soit améliorée en permanence et que de nombreux bugs aient été réparés depuis sa mise en place en 2018. En effet, il reste encore des cas où des problèmes peuvent survenir et les messages devenir illisibles, en particulier avec les très grands groupes.

    @@ -985,88 +982,76 @@ Consultez counte
  • Concrètement, c’est un courriel avec plusieurs destinataires en copie cachée.
  • Vous pouvez activer cette option dans la section “Fonctionnalités expérimentales” des paramètres avancés. Vous pourrez ensuite créer une liste de diffusion à partir du bouton “Nouvelle discussion”.
  • Si vous utilisez plusieurs appareils, veuillez noter qu’il n’est pas possible, pour l’instant, de synchroniser les listes de diffusion.
  • -
  • Les messages envoyés à des listes de diffusion ne sont pas chiffrés, parce que le chiffrement empêche l’anonymat puisque tous les destinataires peuvent voir qui d’autre a reçu le message. -(Mais envoyer des courriels individuels à tout le monde serait encore pire pour la consommation du réseau et à cause des limites d’envoi).
  • +
  • Les messages envoyés à des listes de diffusion ne sont pas chiffrés, parce que le chiffrement romprait l’anonymat puisque tous les destinataires pourraient alors voir qui d’autre a reçu le message. +(Mais envoyer des courriels individuels à tout le monde serait encore pire à cause de la consommation du réseau requise et des limites d’envoi).
  • -

    +

    - Comment puis-je partager ma géolocalisation avec mes contacts ? + Comment partager ma géolocalisation avec mes contacts ?

    • Vous pouvez activer l’envoi de la géolocalisation à la demande dans la section “Fonctionnalités expérimentales” des paramètres avancés.
    • -
    • Ensuite, si vous voulez partager votre position dans une discussion, allez dans “Ajouter une pièce jointe” et sélectionnez “Position”. Vous pouvez alors choisir la durée pendant laquelle vous voulez partager votre position avec les membres de la discussion, de 5 minutes à 6 heures.
    • +
    • Pour partager votre position dans une discussion, allez dans “Ajouter une pièce jointe” et sélectionnez “Position”. Vous pouvez alors choisir la durée pendant laquelle vous voulez partager votre position avec les membres de la discussion, de 5 minutes à 6 heures.
    • Quand vous vous déplacez, vos contacts voient votre position sur une carte dans la discussion.
    • Vous devez activer cette fonctionnalité dans les paramètres avancés pour pouvoir voir la carte et la position de vos contacts.
    • -
    • Cette fonctionnalité ne partage votre position avec personne d’autre que les membres de la discussion. Cependant, pour que la carte s’affiche, les tuiles de carte sont téléchargées depuis mapbox.com, donc si vous visualisez la cart, une requête pour afficher une zone spécifique est envoyée à mapbox.com. Si vous considérez cela comme une faille de sécurité, cette fonctionnalité n’est malheureusement pas faite pour vous. Nous nous efforçons de trouver une alternative décentralisée à Mapbox.
    • -
    • Sur le bureau, votre OS ne peut généralement pas déterminer votre position. À la place, vous pouvez faire un clic droit sur la carte pour décrire votre position, qui sera ensuite envoyée dans la discussion en tant que message tout en apparaissant sur la carte.
    • +
    • Cette fonctionnalité ne partage votre position avec personne d’autre que les membres de la discussion. Cependant, pour que la carte s’affiche, les tuiles de carte sont téléchargées depuis mapbox.com, donc si vous visualisez la carte, une requête pour afficher une zone spécifique est envoyée à mapbox.com. Si cela constitue un risque pour la protection de votre vie privée, cette fonctionnalité n’est probablement pas faite pour vous. Nous nous efforçons de trouver une alternative décentralisée à Mapbox.
    • +
    • Sur l’application de bureau, votre système d’exploitation ne peut généralement pas déterminer votre position. À la place, vous pouvez faire un clic droit sur la carte pour décrire votre position, qui sera ensuite envoyée dans la discussion en tant que message, tout en apparaissant sur la carte.
    -

    +

    - Qu’est-ce que le chiffrement expérimental de base de données protège réellement ? + Que protège réellement le chiffrement expérimental de base de données ?

      -
    • Right now, the database encryption is still very experimental. Don’t rely on -it for protection, you should additionally use encryption of your operating -system, if it provides any.
    • -
    • The database encryption does not yet encrypt the blobs, only the rows and -columns of the database. This more or less means that your messages are safe, -but not your attachments.
    • -
    • For iOS and Android, the encryption keys are stored in the system keychain. -This means the encryption is as secure as the operating system it’s running -on.
    • -
    • The Delta Chat desktop client doesn’t offer database encryption yet, as there -is no standard way to store the encryption keys on the different supported -platforms.
    • +
    • À l’heure actuelle, le chiffrement de la base de données est encore expérimental. Mieux vaut ne pas vous y fier pour la protection de vos données et activer aussi le chiffrement votre système d’exploitation si vous le pouvez.
    • +
    • Le chiffrement de base de données ne permet pas encore de chiffrer les blobs, seulement les lignes et les colonnes de la base. Cela signifie grosso modo que vos messages sont bien protégés, mais pas les pièces jointes.
    • +
    • Sur iOS et Android, les clefs de chiffrements sont stockées dans le trousseau système. Par conséquent, le chiffrement est aussi fiable que le système d’exploitation dont il dépend.
    • +
    • Comme il n’existe aucun moyen standardisé de stocker les clefs de chiffrement sur les différentes plateformes disponibles, le chiffrement de la base de données n’est pas encore disponible pour le client bureau de Delta Chat.
    -

    +

    - Why can I choose to only watch the DeltaChat folder? + Pourquoi peut-on choisir de ne consulter que le dossier Delta Chat ?

    -

    C’est un paramètre expérimental pour certaines personnes qui expérimentent avec des règles côté serveur. Tous les fournisseurs ne supportent pas ceci mais certains permettent de déplacer tous les courriels avec un en-tête “Chat-Version” dans le dossier DeltaChat. Normalement, cela marchera dans l’application Delta Chat.

    +

    Il s’agit d’un paramètre expérimental à destination des personnes qui expérimentent avec des règles côté serveur. Tous les fournisseurs ne le prennent pas en charge, mais certains permettent de déplacer tous les courriels avec un en-tête “Chat-Version” dans le dossier DeltaChat. Normalement, cette action est réalisé par l’application Delta Chat.

    -

    Enabling “Only Fetch from DeltaChat folder” makes sense if you have both:

    +

    Activer l’option “Ne consulter que le dossier Delta Chat” est intéressant si vous avez à la fois :

      -
    • activé une règle côté serveur pour déplacer tous les messages avec un en-tête “Chat-Version” dans le dossier DeltaChat, et - défini le paramètre “Voir les mails classiques” sur “Non, seulement les tchates”.
    • +
    • activé une règle côté serveur pour déplacer tous les messages avec un en-tête “Chat-Version” dans le dossier Delta Chat ;
    • +
    • modifié le paramètre “Voir les courriels classiques” pour “Non, seulement les discussions”.
    -

    In this case, Delta Chat doesn’t need to watch the Inbox, and it’s enough to only watch the DeltaChat folder.

    +

    Si ces deux conditions sont remplies, Delta Chat n’a pas besoin de surveiller la boîte de réception, seulement le dossier Delta Chat.

    -

    +

    - Comment puis-je changer mon compte pour une adresse courriel différente ? + Comment changer mon compte pour une adresse courriel différente ?

      -
    1. Change your address at the “Password and Account” seetings screen in Delta -Chat, enter your password (and if necessary, server settings) for the new -account
    2. -
    3. If possible, make your old e-mail provider forward all e-mails to your new -email address
    4. -
    5. Tell your contacts that you changed your address. If you write this to a -verified group, they will acknowledge this automatically.
    6. +
    7. Remplacez votre adresse courriel dans la fenêtre de configuration “Mot de passe et compte” et renseignez le mot de passe (ainsi que les paramètres serveur, si nécessaire) du nouveau compte.
    8. +
    9. Si vous le pouvez, demandez à votre ancien fournisseur de transférer tous vos courriels sur votre nouveau compte.
    10. +
    11. Informez vos contacts de votre changement d’adresse courriel. Si vous écrivez à un groupe vérifié, le changement sera pris en compte automatiquement par tout le monde.
    -

    To learn about the details behind this, read our blogpost on -it.

    +

    Pour connaître les détails derrière ce procédé, lisez notre article de blog en anglais.

    @@ -1098,7 +1083,7 @@ Cependant, il faut activer des options spéciales pour que cela fonctionne corre

      -
    • La plupart du temps, tous les serveurs courriel fonctionnent très bien. Mais nous conseillons un mélange de mailcow et mailadm, ainsi que nous le décrivons sur notre blog.
    • +
    • La plupart des serveurs courriel fonctionneront très bien. Mais nous conseillons de combiner mailcow et mailadm, ainsi que nous le décrivons sur notre blog.
    • Vous trouverez un guide d’installation sur notre site internet.
    @@ -1128,10 +1113,9 @@ Pour plus d’informations, voir dontkillmy

    @@ -1146,136 +1130,96 @@ Pour plus d’informations, voir dontkillmy
  • Consultez les standards utilisés dans Delta Chat.
  • -

    +

    - Was Delta Chat independently audited for security vulnerabilities? + Est-ce qu’un audit indépendant des failles de sécurité a été réalisé sur Delta Chat ?

    -

    The Delta Chat project underwent four independent security audits in the last years:

    +

    Quatre audits indépendants ont été réalisés sur le projet Delta Chat ces dernières années :

    • -

      In 2019, Include Security analyzed Delta -Chat’s PGP and -RSA libraries. -It found no critical issues, -but two high-severity issues that we subsequently fixed. -It also revealed one medium-severity and some less severe issues, -but there was no way to exploit these vulnerabilities in the Delta Chat implementation. -Some of them we nevertheless fixed since the audit was concluded. -You can read the full report here.

      +

      En 2019, Include Security a analysé les bibliothèques PGP et +RSA de Delta Chat. +Aucune faille critique n’a été trouvée, mais deux failles sévères ont été identifiées et immédiatement réparées par nos soins. +Une faille de gravité moyenne ainsi que quelques failles de gravité moindre ont également été découvertes, sans qu’il soit toutefois possible de les exploiter dans le fonctionnement de Delta Chat. +Nous en avons néanmoins réparées certaines depuis le rapport d’audit. +Le rapport complet est consultable ici.

    • -

      In 2020, Include Security analyzed Delta -Chat’s Rust core, -IMAP, -SMTP, and -TLS libraries. -It did not find any critical or high-severity issues. -The report raised a few medium-severity weaknesses - -they are no threat to Delta Chat users on their own -because they depend on the environment in which Delta Chat is used. -For usability and compatibility reasons, -we can not mitigate all of them -and decided to provide security recommendations to threatened users. -You can read the full report here.

      +

      En 2020, Include Security a analysé les bibliothèques principales Rust de Delta Chat, ainsi que ses bibliothèques IMAP, SMTP et TLS. +Aucun problème grave ou critique n’a été découvert. +Le rapport a tout de même révélé quelques vulnérabilités de gravité moyenne, qui ne représentent pas une menace en elles-mêmes pour les utilisateurs et les utilisatrices de Delta Chat, car elles dépendent de l’environnement dans lequel Delta Chat est utilisé. +Pour des raison de compatibilité et de facilité d’utilisation, nous ne pouvons pas les pallier toutes et avons préféré fournir des préconisations de sécurité aux personnes exposées. +Le rapport complet est consultable ici.

    • -

      Beginning 2023, Cure53 analyzed both the transport encryption of -Delta Chat’s network connections and a reproducible mail server setup as -recommended on this site. -You can read more about the audit on our blog -or read the full report here.

      +

      Début 2023, Cure53 a analysé le chiffrement d’acheminement des connexions réseau de Delta Chat et testé une configuration de serveur de courriel reproductible, telle que recommandée sur ce site. +Vous trouverez plus d’informations sur cet audit sur notre blog ou dans le rapport complet ici.

    • -

      Beginning 2023, we fixed security and privacy issues with the “web -apps shared in a chat” feature, related to failures of sandboxing -especially with Chromium. We subsequently got an independent security -audit from Cure53 and all issues found were fixed in the 1.36 app series released in April 2023. -See here for the full background story on E2E security in the web.

      +

      Début 2023, nous avons réparé les failles de sécurité et de confidentialité de la fonctionnalité “partage d’appli web dans une discussion” liées à des dysfonctionnements en mode bac à sable, en particulier avec Chromium. Après quoi, nous avons soumis Delta Chat à un nouvel audit de sécurité indépendant par Cure53, puis effectué les réparations de toutes les failles découvertes pour la version 1.36 de nos applications, publiée en avril 2023. +Vous trouverez ici un article de fond complet à propos de la sécurité du chiffrement de bout-en-bout sur internet.

    -

    +

    - Comment est financé le développement de Delta Chat? + Comment est financé le développement de Delta Chat ?

    -

    Delta Chat does not receive any Venture Capital and -is not indebted, and under no pressure to produce huge profits, or to -sell users and their friends and family to advertisers (or worse). -We rather use public funding sources, so far from EU and US origins, to help -our efforts in instigating a decentralized and diverse chat messaging eco-system -based on Free and Open-Source community developments.

    +

    Delta Chat ne reçoit par de fonds en capital-risque, n’est pas endetté et ne subit aucune pression pour générer de gros profits ou vendre ses utilisateurs et utilisatrices - en même temps que leurs amis et leur famille - à des annonceurs (ou pire). +Nous préférons utiliser des fonds provenant d’institutions publiques, jusqu’à présent basées en Europe ou aux États-Unis, pour soutenir nos efforts de développement d’un système de messagerie diversifié et décentralisé, basé sur les contributions de la communauté du libre et de l’open-source.

    -

    Concretely, Delta Chat developments have so far been funded from these sources:

    +

    Jusqu’à présent, le développement de Delta Chat a été financé par les sources suivantes :

    • -

      The NEXTLEAP EU project funded the research -and implementation of verified groups and setup contact protocols -in 2017 and 2018 and also helped to integrate End-to-End Encryption -through Autocrypt.

      +

      Le projet européen NEXTLEAP a financé la recherche et le développement des groupes vérifiés, ainsi que la configuration des protocoles de contact en 2017 et 2018. Il a également aidé à intégrer le chiffrement de bout-en-bout avec Autocrypt.

    • -

      The Open Technology Fund gave us a -first 2018/2019 grant (~$200K) during which we majorly improved the Android app -and released a first Desktop app beta version, and which moreover -moored our feature developments in UX research in human rights contexts, -see our concluding Needfinding and UX report. -The second 2019/2020 grant (~$300K) helped us to -release Delta/iOS versions, to convert our core library to Rust, and -to provide new features for all platforms.

      +

      L’association Open Technology Fund nous a octroyé une première subvention en 2018/2019 (de 200.000$ environ), grâce à laquelle nous avons pu apporter des améliorations majeures à l’application Android et publier une première version Beta de l’application de bureau. Elle nous a aussi permis d’ancrer notre recherche UX de développement de fonctionnalités dans des contextes de droits humains.
      +À ce sujet, vous pouvez consulter notre rapport en anglais “Needfinding and UX report”. +La seconde subvention de 2019/2020 (environ 300.000$) nous a permis de publier des version iOS de Delta Chat, de convertir notre bibliothèque principale en Rust et de créer de nouvelles fonctionnalités pour toutes les plateformes.

    • -

      The NLnet foundation granted in 2019/2020 EUR 46K for -completing Rust/Python bindings and instigating a Chat-bot ecosystem.

      +

      La NLnet foundation nous a octroyé une subvention de 46.000€ en 2019/2020 pour avoir achevé la liaison entre Rust et Python, ainsi que pour avoir instauré un système de chatbot.

    • -

      In 2021 we received further EU funding for two Next-Generation-Internet -proposals, namely for EPPD - e-mail provider portability directory (~97K EUR) and AEAP - email address porting (~90K EUR) which resulted in better multi-account support, improved QR-code contact and group setups and many networking improvements on all platforms.

      +

      En 2021, nous avons reçu un financement européen supplémentaire pour deux initiatives de Next Generation Internet : 97.000€ pour la création d’un annuaire de la portabilité des fournisseurs de courriel (ou EPPD pour “e-mail provider portability directory”), et environ 90.000€ pour le développement du portage des adresses courriel (ou AEAP pour “email address porting”). Ces deux projets ont aussi permis une meilleure prise en charge de la fonctionnalité multi-compte, un QR code de contact plus performant et de nombreuses améliorations concernant la gestion des réseaux et les configurations de groupe sur toutes les plateformes.

    • -

      From End 2021 till March 2023 we received Internet Freedom funding (500K USD) from the -U.S. Bureau of Democracy, Human Rights and Labor (DRL). -This funding supported our long-running goals to make Delta Chat more usable -and compatible with a wide range of e-mail servers world-wide, and more resilient and secure -in places often affected by internet censorship and shutdowns.

      +

      Entre la fin de l’année 2021 et mars 2023, nous avons bénéficié d’un fonds Internet Freedom (pour la “liberté d’internet”, de 500.000$) du Bureau of Democracy, Human Rights and Labor (DRL) des États-Unis. +Cet argent est venu soutenir nos deux objectifs de longue date ; à savoir améliorer la compatibilité de Delta Chat pour le rendre utilisable plus facilement avec un large éventail de serveurs de courriel dans le monde entier, et en améliorer la résistance et la sécurité dans les régions où les coupures internet et la censure d’internet sont monnaie courante.

    • -

      Beginning 2023 we got accepted in the Next Generation Internet (NGI) -Entrust program for our “Private Decentralized Apps” proposals. -Exact amount is to be determined (around 100K EUR). -This funding supports further developments of webxdc “apps shared in a chat”.

      +

      Début 2023, nous avons été acceptés dans le programme Entrust de Next Generation Internet (NGI) pour nos projets d’applications privées décentralisées. +Le montant exact de la subvention reste à déterminer (autour de 100.000€). +Ce financement nous permettra de continuer le développement des appli webxdc partagées dans une discussion.

    • -

      Sometimes we receive one-time donations from private individuals. -For example, in 2021 a generous individual bank-wired us 4K EUR -with the subject “keep up the good developments!”. 💜 -We use such money to fund development gatherings or to care for ad-hoc expenses -that can not easily be predicted for, or reimbursed from, public funding grants. -Receiving more donations also helps us to become more independent and long-term viable -as a contributor community.

      +

      Nous recevons parfois des dons ponctuels de la part de personnes privées. + En 2021 par exemple, une généreuse personne nous a envoyé 4000€ par virement bancaire, avec l’intitulé “continuez votre super travail de développement !”. 💜 + Nous utilisons l’argent de ces dons pour financer des rencontres entre développeurs et développeuses ou pour des dépenses ponctuelles difficiles à anticiper ou à rembourser avec des subventions publiques. +Recevoir plus de dons aide notre communauté de contributrices et contributeurs à devenir plus indépendante et à rester viable sur le long terme.

      -
    • Enfin, en dernier mais largement pas des moindres, plusieurs passionné⋅e⋅s et expert⋅e⋅s ont contribué, et contribuent toujours, bénévolement au développement de Delta Chat sans gagner d’argent, ou seulement de petites sommes. Sans leur énergie, Delta Chat n’en serait pas là aujourd’hui… et de très loin.
    • +
    • Dernier point, mais certainement pas des moindres : quelques personnes passionnées et expertes ont apporté, et apportent toujours, leur contribution bénévole au développement de Delta Chat sans contrepartie financière - ou seulement de petites sommes. Sans leur énergie, Delta Chat n’en serait pas là aujourd’hui… et de très loin.
    -

    The monetary funding mentioned above is mostly organized by merlinux GmbH in -Freiburg (Germany), and is distributed to more than a dozen contributors world-wide.

    +

    Les financements mentionnés précédemment sont gérés principalement par merlinux GmbH à Fribourg (Allemagne) et redistribués à plus d’une douzaine de contributeurs et contributrices du monde entier.

    -

    Please see Delta Chat Contribution channels -for both monetary and and other contribution possibilities.

    +

    N’hésitez pas à consulter les Canaux de contribution à Delta Chat Contribution pour en savoir plus sur les différentes manières de contribuer, financières ou non.

    diff --git a/assets/help/id/help.html b/assets/help/id/help.html index 2e635fa72..269096d5c 100644 --- a/assets/help/id/help.html +++ b/assets/help/id/help.html @@ -835,6 +835,9 @@ For other programs, you should be able to find a solution online.

    Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

      +
    • +

      Make sure both devices are on the same Wi-Fi or network

      +
    • On the first device, go to Settings → Add Second Device, unlock the screen if needed and wait a moment until a QR code is shown

      @@ -1028,10 +1031,11 @@ you only open attachments from senders you trust, and not from spammers.
      • -
      • In general, there is no curated appstore and Delta Chat is not responsible -for private apps or their content. Anyone can share private apps with each +
      • In general, anyone can share private apps with each other without restrictions.
      • -
      • You can find some example apps on webxdc.org.
      • +
      • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
      • Many people write their own private apps and post them to the Delta Chat forum.
      diff --git a/assets/help/it/help.html b/assets/help/it/help.html index 3f604a614..9ec1be310 100644 --- a/assets/help/it/help.html +++ b/assets/help/it/help.html @@ -826,6 +826,9 @@ Per altri programmi, dovresti essere in grado di trovare una soluzione online.Sì. Delta Chat 1.36 è dotato di una nuova funzione sperimentale che consente di utilizzare lo stesso account su diversi dispositivi:

        +
      • +

        Make sure both devices are on the same Wi-Fi or network

        +
      • Sul primo dispositivo, andare su Impostazioni → Aggiungi Secondo Dispositivo, sbloccare lo schermo se necessario e attendere un attimo fino a quando non viene visualizzato un codice QR

        @@ -1015,12 +1018,13 @@ solo gli allegati di mittenti di cui ci si fida e non quelli degli spammer.
        • -
        • In generale, non esiste un appstore curato e Delta Chat non è responsabile delle applicazioni private o del loro contenuto. -Chiunque può condividere apps private con -gli altri senza restrizioni.
        • -
        • Potete trovare alcuni esempi di app su webxdc.org.
        • -
        • Molte persone scrivono le proprie applicazioni private e le pubblicano sul forum di Delta Chat -.
        • +
        • In general, anyone can share private apps with each +other without restrictions.
        • +
        • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
        • +
        • Many people write their own private apps and post them to the Delta Chat +forum.

        diff --git a/assets/help/nl/help.html b/assets/help/nl/help.html index a05668652..6b413ecb0 100644 --- a/assets/help/nl/help.html +++ b/assets/help/nl/help.html @@ -835,6 +835,9 @@ Voor andere programma’s kun je zélf een oplossing zoeken op internet.

        Ja, Delta Chat 1.36 bevat een nieuwe, experimentele functie om hetzelfde account op meerdere apparaten te gebruiken:

          +
        • +

          Make sure both devices are on the same Wi-Fi or network

          +
        • Ga op het eerste apparaat naar Instellingen → Tweede apparaat toevoegen, ontgrendel - indien nodig - het scherm en wacht totdat de QR-code in beeld verschijnt.

          @@ -1019,10 +1022,13 @@ niet per definitie veilig. Open dus alléén privé-apps van personen die je ver

          -
        • Er is in principe geen appwinkel met privé-apps en Delta Chat is niet verantwoordelijk voor -de apps of inhoud ervan. Iedereen kan ongelimiteerd privé-apps met elkaar delen.
        • -
        • Op webxdc.org staan wel enkele voorbeeldapps.
        • -
        • De meeste mensen maken hun eigen privé-apps en delen ze op het Delta Chat-forum.
        • +
        • In general, anyone can share private apps with each +other without restrictions.
        • +
        • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
        • +
        • Many people write their own private apps and post them to the Delta Chat +forum.

        diff --git a/assets/help/pl/help.html b/assets/help/pl/help.html index 0267e12a5..bf6a856f6 100644 --- a/assets/help/pl/help.html +++ b/assets/help/pl/help.html @@ -711,6 +711,9 @@ W przypadku innych programów można znaleźć rozwiązanie online.

        Tak. Delta Chat 1.36 zawiera nową, eksperymentalną funkcję korzystania z tego samego konta na różnych urządzeniach:

          +
        • +

          Make sure both devices are on the same Wi-Fi or network

          +
        • Na pierwszym urządzeniu przejdź do Ustawienia → Dodaj kolejne urządzenie, w razie potrzeby odblokuj ekran i poczekaj chwilę, aż pojawi się kod QR

        • @@ -860,9 +863,13 @@ W przypadku innych programów można znaleźć rozwiązanie online.

          -
        • Ogólnie rzecz biorąc, nie ma wyselekcjonowanego sklepu z aplikacjami, a Delta Chat nie ponosi odpowiedzialności za prywatne aplikacje ani ich zawartość. Każdy może udostępniać sobie prywatne aplikacje bez ograniczeń.
        • -
        • Przykładowe aplikacje można znaleźć na stronie webxdc.org.
        • -
        • Wiele osób pisze własne prywatne aplikacje i publikuje je na forum Delta Chat.
        • +
        • In general, anyone can share private apps with each +other without restrictions.
        • +
        • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
        • +
        • Many people write their own private apps and post them to the Delta Chat +forum.

        diff --git a/assets/help/pt/help.html b/assets/help/pt/help.html index b30eabd43..164262782 100644 --- a/assets/help/pt/help.html +++ b/assets/help/pt/help.html @@ -816,6 +816,9 @@ Para outros programas, você deveria achar uma solução online.

        Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

          +
        • +

          Make sure both devices are on the same Wi-Fi or network

          +
        • On the first device, go to Settings → Add Second Device, unlock the screen if needed and wait a moment until a QR code is shown

          @@ -1009,10 +1012,11 @@ you only open attachments from senders you trust, and not from spammers.

          -
        • In general, there is no curated appstore and Delta Chat is not responsible -for private apps or their content. Anyone can share private apps with each +
        • In general, anyone can share private apps with each other without restrictions.
        • -
        • You can find some example apps on webxdc.org.
        • +
        • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
        • Many people write their own private apps and post them to the Delta Chat forum.
        diff --git a/assets/help/ru/help.html b/assets/help/ru/help.html index 137340f3c..5dc850b57 100644 --- a/assets/help/ru/help.html +++ b/assets/help/ru/help.html @@ -852,6 +852,9 @@ RFC.

        Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

          +
        • +

          Make sure both devices are on the same Wi-Fi or network

          +
        • On the first device, go to Settings → Add Second Device, unlock the screen if needed and wait a moment until a QR code is shown

          @@ -1044,10 +1047,11 @@ you only open attachments from senders you trust, and not from spammers.
          • -
          • In general, there is no curated appstore and Delta Chat is not responsible -for private apps or their content. Anyone can share private apps with each +
          • In general, anyone can share private apps with each other without restrictions.
          • -
          • You can find some example apps on webxdc.org.
          • +
          • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
          • Many people write their own private apps and post them to the Delta Chat forum.
          diff --git a/assets/help/sk/help.html b/assets/help/sk/help.html index 36ff5fa4a..71fe78055 100644 --- a/assets/help/sk/help.html +++ b/assets/help/sk/help.html @@ -852,6 +852,9 @@ Pre iné programy by ste mali vedieť nájsť riešenie online.

          Yes. Delta Chat 1.36 comes with a new, experimental function for using the same account on different devices:

            +
          • +

            Make sure both devices are on the same Wi-Fi or network

            +
          • On the first device, go to Settings → Add Second Device, unlock the screen if needed and wait a moment until a QR code is shown

            @@ -1042,10 +1045,11 @@ you only open attachments from senders you trust, and not from spammers.
            • -
            • In general, there is no curated appstore and Delta Chat is not responsible -for private apps or their content. Anyone can share private apps with each +
            • In general, anyone can share private apps with each other without restrictions.
            • -
            • You can find some example apps on webxdc.org.
            • +
            • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
            • Many people write their own private apps and post them to the Delta Chat forum.
            diff --git a/assets/help/sq/help.html b/assets/help/sq/help.html index 19e61b775..4da15ebcc 100644 --- a/assets/help/sq/help.html +++ b/assets/help/sq/help.html @@ -865,6 +865,9 @@ Për programe të tjera, mund të gjeni një zgjidhje në internet.

            Po. Delta Chat 1.36 vjen me një funksion të ri eksperimental për përdorimin e të njëjtës llogari në pajisje të ndryshme:

              +
            • +

              Make sure both devices are on the same Wi-Fi or network

              +
            • Te pajisja e parë, kaloni te Rregullime → Shtoni Pajisje të Dytë, shkyçni ekranin, në u dashtë dhe prisni një çast sa të shfaqet një kod QR

              @@ -1063,12 +1066,13 @@ hapni bashkëngjitje vetëm nga dërgues që u besoni dhe jo prej kujtdo.
              • -
              • Në përgjithësi, s’ka shitore aplikacionesh nën përkujdesje dhe Delta Chat-i -s’është përgjegjës për aplikacionet private apo lëndën e tyre. Cilido mund -të ndajë me të tjerët aplikacione private pa kufizime.
              • -
              • Mund të gjeni disa aplikacione shembuj te webxdc.org.
              • -
              • Mjaft vetë shkruajnë aplikacionet e tyre private dhe i postojnë te forumi i -Delta Chat-it.
              • +
              • In general, anyone can share private apps with each +other without restrictions.
              • +
              • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
              • +
              • Many people write their own private apps and post them to the Delta Chat +forum.

              diff --git a/assets/help/uk/help.html b/assets/help/uk/help.html index 096dafc9b..5159094b0 100644 --- a/assets/help/uk/help.html +++ b/assets/help/uk/help.html @@ -716,6 +716,9 @@

              Так. У Delta Chat 1.36 є нова експериментальна функція для використання одного облікового запису на різних пристроях:

                +
              • +

                Make sure both devices are on the same Wi-Fi or network

                +
              • На першому пристрої перейдіть до Налаштування → Додати другий пристрій, розблокуйте екран, якщо потрібно і трохи зачекайте, поки не з’явиться QR-код

              • @@ -863,9 +866,13 @@

                -
              • Загалом немає спеціального магазину програм, і Delta Chat не несе відповідальності за приватні програми чи їхній вміст. Кожен може ділитися один з одним приватними програмами без обмежень.
              • -
              • Приклади програм можна знайти на webxdc.org.
              • -
              • Багато людей пишуть власні приватні програми та публікують їх на форумі Delta Chat.
              • +
              • In general, anyone can share private apps with each +other without restrictions.
              • +
              • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
              • +
              • Many people write their own private apps and post them to the Delta Chat +forum.

              diff --git a/assets/help/zh_CN/help.html b/assets/help/zh_CN/help.html index 6677e3ccb..03b5c2ef9 100644 --- a/assets/help/zh_CN/help.html +++ b/assets/help/zh_CN/help.html @@ -738,6 +738,9 @@ not their account, you can still communicate in the 1:1 chat. (webxdc.org 找到一些示例应用。 -
            • 很多人编写了他们自己的私人应用,并将应用发布到了 Delta Chat 论坛
            • +
            • In general, anyone can share private apps with each +other without restrictions.
            • +
            • You can send ‘hi’ to xstore@testrun.org +to see an experimental webxdc appstore. +All of the apps are open source and for free.
            • +
            • Many people write their own private apps and post them to the Delta Chat +forum.

            From a4204da2e9f41329c4acae37e32f27cbaf112681 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 14:31:53 +0200 Subject: [PATCH 156/169] update CHANGELOG: core part --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c044a22..7d2ad92a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Delta Chat Android Changelog +## v1.41.0 Testrun +2023-10 + + +* fix sending images and other files in location steaming mode +* fix connectivity view layout if eg. storage shows values larger than 100% +* fix scanning account-QR-codes on older phones that miss the Let's Encrypt system certificate +* fix: make Thunderbird show encrypted subjects +* fix: do not forward document name when forwarding only a webxdc app +* fix: do not create new groups if someone replies to a group message with status "failed" +* fix: do not block new group chats if 1:1 chat is blocked +* fix "Show full message" showing a black screen for some messages received from Microsoft Exchange +* fix: skip read-only mailing lists from forwarding/share chat lists +* fix: do not allow dots at the end of email addresses +* fix: do not send images pasted from the keyboard unconditionally as stickers +* fix: forbid membership changes from possible non-members, allow from possible members +* fix: improve group consistency across members +* fix: delete messages from SMTP queue only on user demand +* fix: improve wrapping of email messages on the wire +* fix memory leak in IMAP + + ## v1.40.1 2023-08 From 7eb64a3573c97f19258d36a2e3eecccbdb089077 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 15:44:45 +0200 Subject: [PATCH 157/169] update CHANGELOG: android part --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d2ad92a6..cb90f7e73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,40 @@ ## v1.41.0 Testrun 2023-10 +* keep screen on while playing voice messages +* pause background music when starting voice messages +* use the system camera as default; the old built-in camera can be enabled at "Settings / Advanced" +* add "Verified by" information to contact profiles +* screen reader: read out message types +* screen reader: allow tapping anywhere in the message to start voice or audio playback +* set different wallpapers for different accounts +* add "Select All" to gallery and to file lists +* resend attachments from profile (long tap, then "Resend" in the menu) +* allow to import a key file instead of a folder containing keys +* search in "Attach Contact" dialog +* improve landscape mode for webxdc apps +* adapt webxdc loading screen to dark mode +* add file name to dialog shown if a webxdc app wants to share information +* add app icon to webxdc info messages and improve webxdc app icon layout +* improve layout of input bar when system emojis are used +* ask for permissions before adding notifications on Android 13 (needed by the required update to API 33) +* switch account if needed when opening webxdc app on the system's home screen +* improve video error messages and logging +* fix sometimes wrong avatar shown in notifications when using multiple accounts +* fix: save map preferences per account to avoid resetting location and zoom +* fix: play audio and voice messages: do not show progress in unrelated messages +* fix: update relative times directly after entering chatlist, do not wait for a minute +* fix issues when after selecting a non-system-language, system-language strings still show up +* fix: only jump to message if info message is from webxdc +* fix: update webxdc document name in titles immediately +* fix: do not open Connectivity when tapping forward/share titles +* fix starting conversation with contact from the phone contacts app +* fix WASM support for some webxdc apps +* fix off-by-one mismatch in manual language selection +* fix: sanitize invalid filename we get from some camera apps +* fix: display sticker footer properly +* fix: webxdc apps starting twice sometimes * fix sending images and other files in location steaming mode * fix connectivity view layout if eg. storage shows values larger than 100% * fix scanning account-QR-codes on older phones that miss the Let's Encrypt system certificate @@ -20,6 +53,8 @@ * fix: delete messages from SMTP queue only on user demand * fix: improve wrapping of email messages on the wire * fix memory leak in IMAP +* update translations and local help +* update to core 1.124.1 ## v1.40.1 From b2a43a88d1c0a6c543fb24d5211d3a7f86f900d0 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 15:46:26 +0200 Subject: [PATCH 158/169] bump version to 1.41.0 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 89918e8e2..d53391ff6 100644 --- a/build.gradle +++ b/build.gradle @@ -98,8 +98,8 @@ android { useLibrary 'org.apache.http.legacy' defaultConfig { - versionCode 660 - versionName "1.40.1" + versionCode 661 + versionName "1.41.0" applicationId "com.b44t.messenger" multiDexEnabled true From 3da91403d18c794e529b440af15d09cb7f040bb1 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 15:49:43 +0200 Subject: [PATCH 159/169] remove empty line --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb90f7e73..07a6987ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,6 @@ * fix off-by-one mismatch in manual language selection * fix: sanitize invalid filename we get from some camera apps * fix: display sticker footer properly - * fix: webxdc apps starting twice sometimes * fix sending images and other files in location steaming mode * fix connectivity view layout if eg. storage shows values larger than 100% From b73c33ad20158b527258cff4632ff85fa215fb3d Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 21:07:41 +0200 Subject: [PATCH 160/169] stop adding 1.38 device message, remove 1.36 device message strings --- res/values/strings.xml | 4 ---- .../thoughtcrime/securesms/ConversationListActivity.java | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 1983c91b9..34720d639 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1072,10 +1072,6 @@ - 1.36 Highlights\n\n💻📱 Use Delta Chat on all your devices easily - just follow three simple steps at \"Settings / Add Second Device\" (experimental)\n\n🖼🔍 Ever searching for an image and could not remember the chat? \"All Media\" from the main menu is yours!\n\nWhat else? Notifications for all accounts, clear chat, and more at %1$s - - We don\'t talk much about security here, but rest assured, we care: See %1$s for recent good news 👌 - 1.38 is out:\n\n📎 Removed upper size limit of attachments\n\n🗜️ PNG images (screenshots!) are now compressed as well\n\n⌨️ For Devs: Better apps for chats with sendToChat() and importFiles() (What is Webxdc? → https://webxdc.org)\n\n… and more at %1$s 1.38 is out:\n\n🖼🔍 Ever searching for an image and could not remember the chat? Then the \"All Media\" button is yours!\n\n🧹 \"Clear Chat\" from the profiles\n\n📎 Removed upper size limit of attachments\n\n🗜️ PNG images (screenshots!) are now compressed as well\n\n… and more at %1$s diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index a7ef9f272..7f3db4160 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -97,10 +97,10 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit protected void onCreate(Bundle icicle, boolean ready) { // update messages - for new messages, do not reuse or modify strings but create new ones. // it is not needed to keep all past update messages, however, when deleted, also the strings should be deleted. - DcContext dcContext = DcHelper.getContext(this); - DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); - msg.setText(getString(R.string.update_1_38_android, "https://get.delta.chat/#changelogs")); - dcContext.addDeviceMsg("update_1_38c_android", msg); + //DcContext dcContext = DcHelper.getContext(this); + //DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); + //msg.setText(getString(R.string.update_1_38_android, "https://get.delta.chat/#changelogs")); + //dcContext.addDeviceMsg("update_1_38c_android", msg); // create view setContentView(R.layout.conversation_list_activity); From ac1f2ebdd96f93c6ec1ff9a1f0c7c1becfb22ef4 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 5 Oct 2023 22:02:09 +0200 Subject: [PATCH 161/169] rename blocked-contacts-activity `BlockedAndShareContactsActivity` is no longer used for sharing contacts, this was always a misleading name and is done since #2719 by `AttachContactActivity`. --- AndroidManifest.xml | 2 +- ...reContactsActivity.java => BlockedContactsActivity.java} | 6 ++---- .../securesms/preferences/ChatsPreferenceFragment.java | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) rename src/org/thoughtcrime/securesms/{BlockedAndShareContactsActivity.java => BlockedContactsActivity.java} (97%) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3fa828bd5..1e8485980 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -277,7 +277,7 @@ android:theme="@style/TextSecure.LightTheme" android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> - diff --git a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java b/src/org/thoughtcrime/securesms/BlockedContactsActivity.java similarity index 97% rename from src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java rename to src/org/thoughtcrime/securesms/BlockedContactsActivity.java index cf2e72569..261cc22c8 100644 --- a/src/org/thoughtcrime/securesms/BlockedAndShareContactsActivity.java +++ b/src/org/thoughtcrime/securesms/BlockedContactsActivity.java @@ -26,7 +26,7 @@ import org.thoughtcrime.securesms.contacts.ContactSelectionListItem; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.util.ViewUtil; -public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBarActivity { +public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity { @Override public void onCreate(Bundle bundle, boolean ready) { @@ -136,9 +136,7 @@ public class BlockedAndShareContactsActivity extends PassphraseRequiredActionBar } @Override - public void onItemLongClick(ContactSelectionListItem view) { - // Not needed - } + public void onItemLongClick(ContactSelectionListItem view) {} } } diff --git a/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java index 85e3f5d6c..967b937a2 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java @@ -21,7 +21,7 @@ import androidx.preference.Preference; import com.b44t.messenger.DcContext; import org.thoughtcrime.securesms.ApplicationPreferencesActivity; -import org.thoughtcrime.securesms.BlockedAndShareContactsActivity; +import org.thoughtcrime.securesms.BlockedContactsActivity; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.connect.DcHelper; import org.thoughtcrime.securesms.permissions.Permissions; @@ -185,7 +185,7 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment { private class BlockedContactsClickListener implements Preference.OnPreferenceClickListener { @Override public boolean onPreferenceClick(Preference preference) { - Intent intent = new Intent(getActivity(), BlockedAndShareContactsActivity.class); + Intent intent = new Intent(getActivity(), BlockedContactsActivity.class); startActivity(intent); return true; } From 3d48669b1a26b734b302ff6e755aba3b420de649 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 6 Oct 2023 18:11:09 +0200 Subject: [PATCH 162/169] according to https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository this should work --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 71943c3bb..de2084ee1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,7 +3,7 @@ name: Bug report about: Report something that isn't working. title: '' assignees: '' - +labels: bug --- Date: Sat, 7 Oct 2023 00:31:37 +0200 Subject: [PATCH 165/169] rename toggleState() to togglePlay() --- src/org/thoughtcrime/securesms/ConversationItem.java | 2 +- src/org/thoughtcrime/securesms/components/AudioView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index 201165654..36fac8431 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -838,7 +838,7 @@ public class ConversationItem extends BaseConversationItem @Override public void onAccessibilityClick() { if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().performClick(); - else if (audioViewStub.resolved()) audioViewStub.get().toggleState(); + else if (audioViewStub.resolved()) audioViewStub.get().togglePlay(); else if (documentViewStub.resolved()) documentViewStub.get().performClick(); else if (webxdcViewStub.resolved()) webxdcViewStub.get().performClick(); } diff --git a/src/org/thoughtcrime/securesms/components/AudioView.java b/src/org/thoughtcrime/securesms/components/AudioView.java index 372325d06..0a15ccda0 100644 --- a/src/org/thoughtcrime/securesms/components/AudioView.java +++ b/src/org/thoughtcrime/securesms/components/AudioView.java @@ -113,7 +113,7 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener this.pauseButton.setOnLongClickListener(listener); } - public void toggleState() { + public void togglePlay() { if (this.playButton.getVisibility() == View.VISIBLE) { playButton.performClick(); } else { From d125e0d8be2a0b06d12e297598556b01967771fb Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sat, 7 Oct 2023 16:28:26 +0200 Subject: [PATCH 166/169] remove unused variables and `@SuppressWarnings("unused")` annotations --- .../com/b44t/messenger/uitests/offline/SharingTest.java | 2 -- .../securesms/ApplicationPreferencesActivity.java | 3 --- .../securesms/ContactMultiSelectionActivity.java | 3 --- .../thoughtcrime/securesms/ContactSelectionListFragment.java | 1 - src/org/thoughtcrime/securesms/ConversationListActivity.java | 1 - src/org/thoughtcrime/securesms/ConversationListFragment.java | 1 - src/org/thoughtcrime/securesms/ConversationListItem.java | 3 --- src/org/thoughtcrime/securesms/ConversationTitleView.java | 3 --- src/org/thoughtcrime/securesms/NewConversationActivity.java | 1 - src/org/thoughtcrime/securesms/ProfileActivity.java | 3 --- src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java | 3 --- src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java | 3 --- .../securesms/accounts/AccountSelectionListAdapter.java | 3 --- .../securesms/accounts/AccountSelectionListFragment.java | 3 --- .../securesms/accounts/AccountSelectionListItem.java | 3 --- .../securesms/components/AttachmentTypeSelector.java | 3 --- .../thoughtcrime/securesms/components/AvatarSelector.java | 3 --- .../securesms/components/RecentPhotoViewRail.java | 3 --- src/org/thoughtcrime/securesms/components/SendButton.java | 3 --- .../thoughtcrime/securesms/components/SquareFrameLayout.java | 4 +--- .../securesms/components/camera/QuickAttachmentDrawer.java | 1 - .../securesms/contacts/ContactSelectionListItem.java | 3 --- src/org/thoughtcrime/securesms/crypto/KeyStoreHelper.java | 5 +---- .../database/loaders/BucketedThreadMediaLoader.java | 3 --- .../securesms/database/loaders/PagingMediaLoader.java | 1 - src/org/thoughtcrime/securesms/mms/ImageSlide.java | 3 --- .../preferences/NotificationsPreferenceFragment.java | 2 -- .../securesms/providers/SingleUseBlobProvider.java | 3 --- .../securesms/reactions/ReactionRecipientItem.java | 3 --- .../securesms/reactions/ReactionRecipientsAdapter.java | 3 --- src/org/thoughtcrime/securesms/util/DateUtils.java | 3 --- 31 files changed, 2 insertions(+), 80 deletions(-) diff --git a/androidTest/com/b44t/messenger/uitests/offline/SharingTest.java b/androidTest/com/b44t/messenger/uitests/offline/SharingTest.java index 474974acc..17fdd680f 100644 --- a/androidTest/com/b44t/messenger/uitests/offline/SharingTest.java +++ b/androidTest/com/b44t/messenger/uitests/offline/SharingTest.java @@ -44,8 +44,6 @@ public class SharingTest { // PLEASE BACKUP YOUR ACCOUNT BEFORE RUNNING THIS! // ============================================================================================== - @SuppressWarnings("unused") - private final static String TAG = SharingTest.class.getSimpleName(); private static int createdGroupId; private static int createdSingleChatId; diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index c88be36dd..75e96d619 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -66,9 +66,6 @@ import org.thoughtcrime.securesms.util.ScreenLockUtil; public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarActivity implements SharedPreferences.OnSharedPreferenceChangeListener { - @SuppressWarnings("unused") - private static final String TAG = ApplicationPreferencesActivity.class.getSimpleName(); - private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile"; private static final String PREFERENCE_CATEGORY_NOTIFICATIONS = "preference_category_notifications"; private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance"; diff --git a/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java b/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java index 291423df2..81ae4d653 100644 --- a/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java +++ b/src/org/thoughtcrime/securesms/ContactMultiSelectionActivity.java @@ -33,9 +33,6 @@ import java.util.List; */ public class ContactMultiSelectionActivity extends ContactSelectionActivity { - @SuppressWarnings("unused") - private final static String TAG = ContactMultiSelectionActivity.class.getSimpleName(); - @Override protected void onCreate(Bundle icicle, boolean ready) { getIntent().putExtra(ContactSelectionListFragment.MULTI_SELECT, true); diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 415182ef1..fbfb26495 100644 --- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -77,7 +77,6 @@ public class ContactSelectionListFragment extends Fragment implements LoaderManager.LoaderCallbacks, DcEventCenter.DcEventDelegate { - @SuppressWarnings("unused") private static final String TAG = ContactSelectionListFragment.class.getSimpleName(); public static final String MULTI_SELECT = "multi_select"; diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index 7f3db4160..316b337af 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -72,7 +72,6 @@ import org.thoughtcrime.securesms.util.SendRelayedMessageUtil; public class ConversationListActivity extends PassphraseRequiredActionBarActivity implements ConversationListFragment.ConversationSelectedListener { - @SuppressWarnings("unused") private static final String TAG = ConversationListActivity.class.getSimpleName(); private static final String OPENPGP4FPR = "openpgp4fpr"; private static final String NDK_ARCH_WARNED = "ndk_arch_warned"; diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index 93c7e3f04..20e96ef28 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -90,7 +90,6 @@ public class ConversationListFragment extends Fragment public static final String ARCHIVE = "archive"; public static final String RELOAD_LIST = "reload_list"; - @SuppressWarnings("unused") private static final String TAG = ConversationListFragment.class.getSimpleName(); private ActionMode actionMode; diff --git a/src/org/thoughtcrime/securesms/ConversationListItem.java b/src/org/thoughtcrime/securesms/ConversationListItem.java index 47904089e..1cbd7eff7 100644 --- a/src/org/thoughtcrime/securesms/ConversationListItem.java +++ b/src/org/thoughtcrime/securesms/ConversationListItem.java @@ -61,9 +61,6 @@ import java.util.Set; public class ConversationListItem extends RelativeLayout implements BindableConversationListItem, Unbindable { - @SuppressWarnings("unused") - private final static String TAG = ConversationListItem.class.getSimpleName(); - private final static Typeface BOLD_TYPEFACE = Typeface.create("sans-serif-medium", Typeface.NORMAL); private final static Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif", Typeface.NORMAL); diff --git a/src/org/thoughtcrime/securesms/ConversationTitleView.java b/src/org/thoughtcrime/securesms/ConversationTitleView.java index cc0aabda7..f3a0dd14e 100644 --- a/src/org/thoughtcrime/securesms/ConversationTitleView.java +++ b/src/org/thoughtcrime/securesms/ConversationTitleView.java @@ -23,9 +23,6 @@ import org.thoughtcrime.securesms.util.ViewUtil; public class ConversationTitleView extends RelativeLayout { - @SuppressWarnings("unused") - private static final String TAG = ConversationTitleView.class.getSimpleName(); - private View content; private ImageView back; private AvatarView avatar; diff --git a/src/org/thoughtcrime/securesms/NewConversationActivity.java b/src/org/thoughtcrime/securesms/NewConversationActivity.java index 666e9574c..aa48935b5 100644 --- a/src/org/thoughtcrime/securesms/NewConversationActivity.java +++ b/src/org/thoughtcrime/securesms/NewConversationActivity.java @@ -50,7 +50,6 @@ import static org.thoughtcrime.securesms.util.RelayUtil.isRelayingMessageContent */ public class NewConversationActivity extends ContactSelectionActivity { - @SuppressWarnings("unused") private static final String TAG = NewConversationActivity.class.getSimpleName(); public static final String MAILTO = "mailto"; private static final String SUBJECT = "subject"; diff --git a/src/org/thoughtcrime/securesms/ProfileActivity.java b/src/org/thoughtcrime/securesms/ProfileActivity.java index 7a27261c0..8e443dab6 100644 --- a/src/org/thoughtcrime/securesms/ProfileActivity.java +++ b/src/org/thoughtcrime/securesms/ProfileActivity.java @@ -44,9 +44,6 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity implements DcEventCenter.DcEventDelegate { - @SuppressWarnings("unused") - private final static String TAG = ProfileActivity.class.getSimpleName(); - public static final String CHAT_ID_EXTRA = "chat_id"; public static final String CONTACT_ID_EXTRA = "contact_id"; public static final String FORCE_TAB_EXTRA = "force_tab"; diff --git a/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java b/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java index c16f47c88..537b0c78c 100644 --- a/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileDocumentsAdapter.java @@ -27,9 +27,6 @@ import java.util.Set; class ProfileDocumentsAdapter extends StickyHeaderGridAdapter { - @SuppressWarnings("unused") - private static final String TAG = ProfileDocumentsAdapter.class.getSimpleName(); - private final Context context; private final Locale locale; private final ItemClickListener itemClickListener; diff --git a/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java b/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java index 483dc66c3..5bd775337 100644 --- a/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java +++ b/src/org/thoughtcrime/securesms/ProfileGalleryAdapter.java @@ -23,9 +23,6 @@ import java.util.Set; class ProfileGalleryAdapter extends StickyHeaderGridAdapter { - @SuppressWarnings("unused") - private static final String TAG = ProfileGalleryAdapter.class.getSimpleName(); - private final Context context; private final GlideRequests glideRequests; private final Locale locale; diff --git a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java index a61fc92fa..66d9cb891 100644 --- a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java +++ b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java @@ -20,9 +20,6 @@ import org.thoughtcrime.securesms.mms.GlideRequests; public class AccountSelectionListAdapter extends RecyclerView.Adapter { - @SuppressWarnings("unused") - private final static String TAG = AccountSelectionListAdapter.class.getSimpleName(); - private final @NonNull Context context; private final @NonNull DcAccounts accounts; private @NonNull int[] accountList = new int[0]; diff --git a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java index 1ad3161cc..be83c84bc 100644 --- a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java +++ b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java @@ -24,9 +24,6 @@ import static com.b44t.messenger.DcContact.DC_CONTACT_ID_ADD_ACCOUNT; public class AccountSelectionListFragment extends DialogFragment { - @SuppressWarnings("unused") - private static final String TAG = AccountSelectionListFragment.class.getSimpleName(); - private RecyclerView recyclerView; @Override diff --git a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListItem.java b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListItem.java index 726be41ce..79d3f37b2 100644 --- a/src/org/thoughtcrime/securesms/accounts/AccountSelectionListItem.java +++ b/src/org/thoughtcrime/securesms/accounts/AccountSelectionListItem.java @@ -24,9 +24,6 @@ import org.thoughtcrime.securesms.util.ViewUtil; public class AccountSelectionListItem extends LinearLayout { - @SuppressWarnings("unused") - private static final String TAG = AccountSelectionListItem.class.getSimpleName(); - private AvatarImageView contactPhotoImage; private View addrContainer; private TextView addrView; diff --git a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java index e36165969..930521977 100644 --- a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java +++ b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java @@ -45,9 +45,6 @@ public class AttachmentTypeSelector extends PopupWindow { private static final int ANIMATION_DURATION = 300; - @SuppressWarnings("unused") - private static final String TAG = AttachmentTypeSelector.class.getSimpleName(); - private final @NonNull LoaderManager loaderManager; private final @NonNull RecentPhotoViewRail recentRail; private final @NonNull ImageView imageButton; diff --git a/src/org/thoughtcrime/securesms/components/AvatarSelector.java b/src/org/thoughtcrime/securesms/components/AvatarSelector.java index 32efee766..89f6336e7 100644 --- a/src/org/thoughtcrime/securesms/components/AvatarSelector.java +++ b/src/org/thoughtcrime/securesms/components/AvatarSelector.java @@ -31,9 +31,6 @@ public class AvatarSelector extends PopupWindow { private static final int ANIMATION_DURATION = 300; - @SuppressWarnings("unused") - private static final String TAG = AttachmentTypeSelector.class.getSimpleName(); - private final @NonNull LoaderManager loaderManager; private final @NonNull RecentPhotoViewRail recentRail; private final @NonNull ImageView imageButton; diff --git a/src/org/thoughtcrime/securesms/components/RecentPhotoViewRail.java b/src/org/thoughtcrime/securesms/components/RecentPhotoViewRail.java index 00653ded6..272cc5ed7 100644 --- a/src/org/thoughtcrime/securesms/components/RecentPhotoViewRail.java +++ b/src/org/thoughtcrime/securesms/components/RecentPhotoViewRail.java @@ -80,9 +80,6 @@ public class RecentPhotoViewRail extends FrameLayout implements LoaderManager.Lo private static class RecentPhotoAdapter extends CursorRecyclerViewAdapter { - @SuppressWarnings("unused") - private static final String TAG = RecentPhotoAdapter.class.getName(); - @NonNull private final Uri baseUri; @Nullable private OnItemClickedListener clickedListener; diff --git a/src/org/thoughtcrime/securesms/components/SendButton.java b/src/org/thoughtcrime/securesms/components/SendButton.java index ef9c1a1e2..6de464b80 100644 --- a/src/org/thoughtcrime/securesms/components/SendButton.java +++ b/src/org/thoughtcrime/securesms/components/SendButton.java @@ -22,21 +22,18 @@ public class SendButton extends ImageButton private Optional transportOptionsPopup = Optional.absent(); - @SuppressWarnings("unused") public SendButton(Context context) { super(context); this.transportOptions = initializeTransportOptions(); ViewUtil.mirrorIfRtl(this, getContext()); } - @SuppressWarnings("unused") public SendButton(Context context, AttributeSet attrs) { super(context, attrs); this.transportOptions = initializeTransportOptions(); ViewUtil.mirrorIfRtl(this, getContext()); } - @SuppressWarnings("unused") public SendButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.transportOptions = initializeTransportOptions(); diff --git a/src/org/thoughtcrime/securesms/components/SquareFrameLayout.java b/src/org/thoughtcrime/securesms/components/SquareFrameLayout.java index f2cfe5f16..0572c3481 100644 --- a/src/org/thoughtcrime/securesms/components/SquareFrameLayout.java +++ b/src/org/thoughtcrime/securesms/components/SquareFrameLayout.java @@ -13,17 +13,15 @@ public class SquareFrameLayout extends FrameLayout { private final boolean squareHeight; - @SuppressWarnings("unused") public SquareFrameLayout(Context context) { this(context, null); } - @SuppressWarnings("unused") public SquareFrameLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } - @TargetApi(VERSION_CODES.HONEYCOMB) @SuppressWarnings("unused") + @TargetApi(VERSION_CODES.HONEYCOMB) public SquareFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); diff --git a/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java b/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java index 0b8d8a609..96e7f5e2a 100644 --- a/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java +++ b/src/org/thoughtcrime/securesms/components/camera/QuickAttachmentDrawer.java @@ -310,7 +310,6 @@ public class QuickAttachmentDrawer extends ViewGroup implements InputView, Camer } } - @SuppressWarnings("unused") public void setSlideOffset(int slideOffset) { this.slideOffset = slideOffset; requestLayout(); diff --git a/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java b/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java index 3d0cd3891..6998e86e7 100644 --- a/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java +++ b/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java @@ -20,9 +20,6 @@ import org.thoughtcrime.securesms.util.ViewUtil; public class ContactSelectionListItem extends LinearLayout implements RecipientModifiedListener { - @SuppressWarnings("unused") - private static final String TAG = ContactSelectionListItem.class.getSimpleName(); - private AvatarView avatar; private View numberContainer; private TextView numberView; diff --git a/src/org/thoughtcrime/securesms/crypto/KeyStoreHelper.java b/src/org/thoughtcrime/securesms/crypto/KeyStoreHelper.java index 6bbe73cef..5a957c368 100644 --- a/src/org/thoughtcrime/securesms/crypto/KeyStoreHelper.java +++ b/src/org/thoughtcrime/securesms/crypto/KeyStoreHelper.java @@ -151,9 +151,6 @@ public final class KeyStoreHelper { public static class SealedData { - @SuppressWarnings("unused") - private static final String TAG = KeyStoreHelper.class.getSimpleName(); - @JsonProperty @JsonSerialize(using = ByteArraySerializer.class) @JsonDeserialize(using = ByteArrayDeserializer.class) @@ -170,7 +167,7 @@ public final class KeyStoreHelper { } @SuppressWarnings("unused") - public SealedData() {} + public SealedData() { /* needed by JsonUtils.fromJson() */ } public String serialize() { try { diff --git a/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java b/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java index 57a7db296..91b58ba9a 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java @@ -25,9 +25,6 @@ import java.util.Map; public class BucketedThreadMediaLoader extends AsyncTaskLoader { - @SuppressWarnings("unused") - private static final String TAG = BucketedThreadMediaLoader.class.getSimpleName(); - private final int chatId; private final int msgType1; private final int msgType2; diff --git a/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java b/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java index e288da2bf..1cc3ebf55 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java @@ -15,7 +15,6 @@ import org.thoughtcrime.securesms.util.AsyncLoader; public class PagingMediaLoader extends AsyncLoader { - @SuppressWarnings("unused") private static final String TAG = PagingMediaLoader.class.getSimpleName(); private final DcMsg msg; diff --git a/src/org/thoughtcrime/securesms/mms/ImageSlide.java b/src/org/thoughtcrime/securesms/mms/ImageSlide.java index cccadb977..a1d8cf072 100644 --- a/src/org/thoughtcrime/securesms/mms/ImageSlide.java +++ b/src/org/thoughtcrime/securesms/mms/ImageSlide.java @@ -30,9 +30,6 @@ import org.thoughtcrime.securesms.util.MediaUtil; public class ImageSlide extends Slide { - @SuppressWarnings("unused") - private static final String TAG = ImageSlide.class.getSimpleName(); - public ImageSlide(@NonNull Context context, @NonNull DcMsg dcMsg) { super(context, new DcAttachment(dcMsg)); dcMsgId = dcMsg.getId(); diff --git a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java index 60341dff7..0d11d4e35 100644 --- a/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/NotificationsPreferenceFragment.java @@ -29,8 +29,6 @@ import static android.app.Activity.RESULT_OK; public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragment { - @SuppressWarnings("unused") - private static final String TAG = NotificationsPreferenceFragment.class.getSimpleName(); private static final int REQUEST_CODE_NOTIFICATION_SELECTED = 1; private CheckBoxPreference ignoreBattery; diff --git a/src/org/thoughtcrime/securesms/providers/SingleUseBlobProvider.java b/src/org/thoughtcrime/securesms/providers/SingleUseBlobProvider.java index 4bad3b2d4..ca61637dc 100644 --- a/src/org/thoughtcrime/securesms/providers/SingleUseBlobProvider.java +++ b/src/org/thoughtcrime/securesms/providers/SingleUseBlobProvider.java @@ -14,9 +14,6 @@ import java.util.Map; public class SingleUseBlobProvider { - @SuppressWarnings("unused") - private static final String TAG = SingleUseBlobProvider.class.getSimpleName(); - public static final String AUTHORITY = "org.thoughtcrime.securesms"; public static final String PATH = "memory/*/#"; private static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/memory"); diff --git a/src/org/thoughtcrime/securesms/reactions/ReactionRecipientItem.java b/src/org/thoughtcrime/securesms/reactions/ReactionRecipientItem.java index aa95dd89e..3bac30608 100644 --- a/src/org/thoughtcrime/securesms/reactions/ReactionRecipientItem.java +++ b/src/org/thoughtcrime/securesms/reactions/ReactionRecipientItem.java @@ -19,9 +19,6 @@ import org.thoughtcrime.securesms.util.ViewUtil; public class ReactionRecipientItem extends LinearLayout { - @SuppressWarnings("unused") - private static final String TAG = ReactionRecipientItem.class.getSimpleName(); - private AvatarImageView contactPhotoImage; private View addrContainer; private TextView addrView; diff --git a/src/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java b/src/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java index f63ee8e1b..d86cf473e 100644 --- a/src/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java +++ b/src/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java @@ -17,9 +17,6 @@ import java.util.ArrayList; public class ReactionRecipientsAdapter extends RecyclerView.Adapter { - @SuppressWarnings("unused") - private final static String TAG = ReactionRecipientsAdapter.class.getSimpleName(); - private @NonNull ArrayList> contactsReactions = new ArrayList<>(); private final LayoutInflater layoutInflater; private final ItemClickListener clickListener; diff --git a/src/org/thoughtcrime/securesms/util/DateUtils.java b/src/org/thoughtcrime/securesms/util/DateUtils.java index 6173f3d96..b1fb26e33 100644 --- a/src/org/thoughtcrime/securesms/util/DateUtils.java +++ b/src/org/thoughtcrime/securesms/util/DateUtils.java @@ -33,9 +33,6 @@ import java.util.concurrent.TimeUnit; */ public class DateUtils extends android.text.format.DateUtils { - @SuppressWarnings("unused") - private static final String TAG = DateUtils.class.getSimpleName(); - private static boolean isWithin(final long millis, final long span, final TimeUnit unit) { return System.currentTimeMillis() - millis <= unit.toMillis(span); } From d4c763e28250004c1ba0c3ff43e44973f7518ac2 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sat, 7 Oct 2023 21:59:26 +0200 Subject: [PATCH 167/169] fix some linter warnings --- .../securesms/WebxdcActivity.java | 40 ++++++++++--------- .../securesms/components/AvatarImageView.java | 2 - .../database/loaders/PagingMediaLoader.java | 3 +- .../preferences/ChatBackgroundActivity.java | 2 +- .../securesms/video/recode/VideoRecoder.java | 1 - 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index dd0db90af..da98bc907 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -27,6 +27,7 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; +import androidx.appcompat.app.ActionBar; import androidx.core.app.TaskStackBuilder; import androidx.core.content.pm.ShortcutInfoCompat; import androidx.core.content.pm.ShortcutManagerCompat; @@ -216,13 +217,16 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE private void setScreenMode() { // enter/exit fullscreen mode depending on orientation (landscape/portrait), - // on tablets there is enought height so fullscreen mode is never enabled there + // on tablets there is enough height so fullscreen mode is never enabled there boolean enable = getResources().getBoolean(R.bool.isLandscape) && !getResources().getBoolean(R.bool.isBigScreen); getWindow().getDecorView().setSystemUiVisibility(enable? View.SYSTEM_UI_FLAG_FULLSCREEN : 0); - if (enable) { - getSupportActionBar().hide(); - } else { - getSupportActionBar().show(); + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + if (enable) { + actionBar.hide(); + } else { + actionBar.show(); + } } } @@ -281,19 +285,19 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE res = new WebResourceResponse("text/plain", "UTF-8", targetStream); } - if (res != null) { - Map headers = new HashMap<>(); - headers.put("Content-Security-Policy", - "default-src 'self'; " - + "style-src 'self' 'unsafe-inline' blob: ; " - + "font-src 'self' data: blob: ; " - + "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ; " - + "connect-src 'self' data: blob: ; " - + "img-src 'self' data: blob: ; " - + "media-src 'self' data: blob: ;" - + "webrtc 'block' ; " - ); - headers.put("X-DNS-Prefetch-Control", "off"); + Map headers = new HashMap<>(); + headers.put("Content-Security-Policy", + "default-src 'self'; " + + "style-src 'self' 'unsafe-inline' blob: ; " + + "font-src 'self' data: blob: ; " + + "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ; " + + "connect-src 'self' data: blob: ; " + + "img-src 'self' data: blob: ; " + + "media-src 'self' data: blob: ;" + + "webrtc 'block' ; " + ); + headers.put("X-DNS-Prefetch-Control", "off"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { res.setResponseHeaders(headers); } return res; diff --git a/src/org/thoughtcrime/securesms/components/AvatarImageView.java b/src/org/thoughtcrime/securesms/components/AvatarImageView.java index 685037ddc..fdd22011a 100644 --- a/src/org/thoughtcrime/securesms/components/AvatarImageView.java +++ b/src/org/thoughtcrime/securesms/components/AvatarImageView.java @@ -20,8 +20,6 @@ import org.thoughtcrime.securesms.util.ThemeUtil; public class AvatarImageView extends AppCompatImageView { - private static final String TAG = AvatarImageView.class.getSimpleName(); - private OnClickListener listener = null; public AvatarImageView(Context context) { diff --git a/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java b/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java index 1cc3ebf55..ded87ae75 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/PagingMediaLoader.java @@ -44,7 +44,6 @@ public class PagingMediaLoader extends AsyncLoader { DcMsg unfound = context.getMsg(msg.getId()); Log.e(TAG, "did not find message in list: " + unfound.getId() + " / " + unfound.getFile() + " / " + unfound.getText()); } - DcMediaGalleryElement retVal = new DcMediaGalleryElement(mediaMessages, currentIndex, context, leftIsRecent); - return retVal; + return new DcMediaGalleryElement(mediaMessages, currentIndex, context, leftIsRecent); } } diff --git a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java index 295fe8c09..dea68ce2d 100644 --- a/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java +++ b/src/org/thoughtcrime/securesms/preferences/ChatBackgroundActivity.java @@ -124,7 +124,7 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity Point size = new Point(); display.getSize(size); // resize so that the larger side fits the screen accurately - int largerSide = (size.x > size.y ? size.x : size.y); + int largerSide = Math.max(size.x, size.y); Bitmap scaledBitmap = GlideApp.with(context) .asBitmap() .load(imageUri) diff --git a/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java b/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java index 19719c37d..467ea75fe 100644 --- a/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java +++ b/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java @@ -10,7 +10,6 @@ import android.media.MediaExtractor; import android.media.MediaFormat; import android.os.Build; import android.util.Log; -import android.widget.Toast; import androidx.appcompat.app.AlertDialog; From cb81a7e2c12841a08598aff090625847061abc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Sat, 7 Oct 2023 17:02:35 -0400 Subject: [PATCH 168/169] Update src/org/thoughtcrime/securesms/WebxdcActivity.java Co-authored-by: bjoern --- .../securesms/WebxdcActivity.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java index da98bc907..6efbe6d55 100644 --- a/src/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java @@ -285,19 +285,19 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE res = new WebResourceResponse("text/plain", "UTF-8", targetStream); } - Map headers = new HashMap<>(); - headers.put("Content-Security-Policy", - "default-src 'self'; " - + "style-src 'self' 'unsafe-inline' blob: ; " - + "font-src 'self' data: blob: ; " - + "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ; " - + "connect-src 'self' data: blob: ; " - + "img-src 'self' data: blob: ; " - + "media-src 'self' data: blob: ;" - + "webrtc 'block' ; " - ); - headers.put("X-DNS-Prefetch-Control", "off"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + Map headers = new HashMap<>(); + headers.put("Content-Security-Policy", + "default-src 'self'; " + + "style-src 'self' 'unsafe-inline' blob: ; " + + "font-src 'self' data: blob: ; " + + "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ; " + + "connect-src 'self' data: blob: ; " + + "img-src 'self' data: blob: ; " + + "media-src 'self' data: blob: ;" + + "webrtc 'block' ; " + ); + headers.put("X-DNS-Prefetch-Control", "off"); res.setResponseHeaders(headers); } return res; From 31f96e1f9da67a2aca24181e5d6bde49268b1062 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sun, 8 Oct 2023 00:07:00 +0200 Subject: [PATCH 169/169] registration screen: make checkbox use acent color --- res/layout/registration_activity.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/layout/registration_activity.xml b/res/layout/registration_activity.xml index c22ac042a..66c31e899 100644 --- a/res/layout/registration_activity.xml +++ b/res/layout/registration_activity.xml @@ -151,7 +151,7 @@ app:layout_constraintStart_toEndOf="@id/advanced_icon" app:layout_constraintTop_toBottomOf="@id/no_servers_hint" /> -