From 766d50e602644a8fa85801c602edd995c40b6759 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 29 Sep 2020 12:11:44 +0200 Subject: [PATCH 1/8] Prevent exception (would be caught but is annoying) --- .../components/KeyboardAwareLinearLayout.java | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java b/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java index df1739332..c6e305147 100644 --- a/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java +++ b/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java @@ -120,20 +120,24 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat { @TargetApi(VERSION_CODES.LOLLIPOP) private int getViewInset() { - try { - Field attachInfoField = View.class.getDeclaredField("mAttachInfo"); - attachInfoField.setAccessible(true); - Object attachInfo = attachInfoField.get(this); - if (attachInfo != null) { - Field stableInsetsField = attachInfo.getClass().getDeclaredField("mStableInsets"); - stableInsetsField.setAccessible(true); - Rect insets = (Rect)stableInsetsField.get(attachInfo); - return insets.bottom; + // In Android 10 we can't use mAttatchInfo anymore, so we don't even need to try it + // https://developer.android.com/about/versions/10/non-sdk-q + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + try { + Field attachInfoField = View.class.getDeclaredField("mAttachInfo"); + attachInfoField.setAccessible(true); + Object attachInfo = attachInfoField.get(this); + if (attachInfo != null) { + Field stableInsetsField = attachInfo.getClass().getDeclaredField("mStableInsets"); + stableInsetsField.setAccessible(true); + Rect insets = (Rect) stableInsetsField.get(attachInfo); + return insets.bottom; + } + } catch (NoSuchFieldException nsfe) { + Log.w(TAG, "field reflection error when measuring view inset", nsfe); + } catch (IllegalAccessException iae) { + Log.w(TAG, "access reflection error when measuring view inset", iae); } - } catch (NoSuchFieldException nsfe) { - Log.w(TAG, "field reflection error when measuring view inset", nsfe); - } catch (IllegalAccessException iae) { - Log.w(TAG, "access reflection error when measuring view inset", iae); } return 0; } From eaa891c8e7b7f27c6fb577cfa11bdf3f7dd791de Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sat, 31 Oct 2020 18:34:50 +0100 Subject: [PATCH 2/8] Properly fix the problem --- .../components/KeyboardAwareLinearLayout.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java b/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java index c6e305147..d98dd158a 100644 --- a/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java +++ b/src/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java @@ -22,11 +22,13 @@ import android.graphics.Rect; import android.os.Build; import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; -import androidx.appcompat.widget.LinearLayoutCompat; import android.util.AttributeSet; import android.util.Log; import android.view.Surface; import android.view.View; +import android.view.WindowInsets; + +import androidx.appcompat.widget.LinearLayoutCompat; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.util.ServiceUtil; @@ -120,9 +122,13 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat { @TargetApi(VERSION_CODES.LOLLIPOP) private int getViewInset() { - // In Android 10 we can't use mAttatchInfo anymore, so we don't even need to try it - // https://developer.android.com/about/versions/10/non-sdk-q - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + // In Android 10 we can't use mAttatchInfo anymore, instead use the SDK interface: + if (Build.VERSION.SDK_INT >= VERSION_CODES.Q) { + WindowInsets insets = getRootWindowInsets(); + if (insets == null) return 0; + return insets.getStableInsetBottom(); + } else { + // Some older Android versions don't know `getRootViewInsets()` yet, so we still need the old way: try { Field attachInfoField = View.class.getDeclaredField("mAttachInfo"); attachInfoField.setAccessible(true); From f1336c44d66326b359df8e8e4f985e7ac3e187d4 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 31 Oct 2020 23:14:46 +0100 Subject: [PATCH 3/8] update deltachat-core-rust submodule --- 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 fa7b6c001..c6c2fb562 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit fa7b6c001e9ec1007ffee3fe1c9ec7a5bc15664f +Subproject commit c6c2fb562e5e7c5770e50d590e9156a3da57e724 From 465a35a10022dfd324ac78ae1574fe07fd3283a2 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 1 Nov 2020 00:34:23 +0100 Subject: [PATCH 4/8] update translations --- res/values-gl/strings.xml | 85 +++++++++++++++++++++++++++++++++++++++ res/values-in/strings.xml | 8 ++++ 2 files changed, 93 insertions(+) diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index 850740288..9b5d35fc1 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -10,11 +10,14 @@ On Off Por omisión + Por omisión (%1$s) + Por omisión (igual que arriba) Personalizado Ningún Automático Estrito Abrir + Abrir anexo Unirse Volta a unirte Eliminar @@ -33,6 +36,7 @@ Gardar Chat Medios + Perfil Menú principal Inciar chat Mostrar contrasinal @@ -42,6 +46,7 @@ Un momento... Feito Desfacer + Sen conexión Seguinte Fallo @@ -95,6 +100,8 @@ Eu Borrador Imaxe + + Resposta Gif Imaxes Audio @@ -121,6 +128,8 @@ Maxenta Branco + Zoo + Moi pequena Pequeno Normal Grande @@ -149,12 +158,17 @@ Engadir anexo Deixar grupo Eliminar conversa + Tes a certeza de querer eliminar \"%1$s\"? Eliminar mensaxes Eliminar imaxe + Eliminar contacto Eliminar todas as localizacións? Eliminar esta localización? Detalles da mensaxe Copiar ao portaretallos + Copiar selección + Copiar ligazón + Pegar desde portapapeis Reenviar mensaxe Voltar a enviar mensaxes Respostar a mensaxe @@ -195,6 +209,9 @@ Fixar Desafixar + Non se atopa a mensaxe orixinal + Responder de xeito privado + Acalar durante 1 h. Acalar durante 2 h. Acalar durante 1 día @@ -208,6 +225,10 @@ durante 2 h. durante 6 h. + + Enviar o seguinte ficheiro a %s? + Enviar os seguintes %d ficheiros a %s? + Ficheiro gardado en \"%1$s\". Chat de vídeo @@ -244,8 +265,12 @@ Eliminar contacto %1$s?\n\nOs contactos con conversas activas e os contactos da libreta de enderezos do sistema non se poden eliminar de xeito definitivo. Non podes eliminar contactos con conversas activas. Conversa con %1$s? + Eliminar %s? Eliminar %1$s do grupo? + Queres abrir esta ligazón? + + Contactos Introducir nome ou enderezo de correo @@ -284,10 +309,20 @@ Mensaxes que me enviei a min mesma Mensaxes gardadas • Reenvía aquí as mensaxes para un acceso rápido\n\n• Toma notas de texto ou voz\n\n• Anexa medios para gardalos + + Gardado Solicitude de contacto Sen solicitudes de contacto.\n\nSe queres que os correos tradicionais aparezan aquí como solicitudes de contacto, podes establecelo nos axustes da app. Reintentar o envío da mensaxe Non se puido enviar a mensaxe + + Non podes escribir porque non estás no grupo. Para unirte, solicítallo a outro membro. + A conversa contén mensaxes creados localmente. Polo tanto non podes escribir ningunha mensaxe. + Preme nunha mensaxe para aceptar ou denegar a solicitude de contacto + Non se pode motrar este tipo de ficheiro: %s + Erro ó cargar o anexo + + Mostrar localizacións no marco temporal Mostrar trazas @@ -303,6 +338,8 @@ Nome do grupo Avatar do grupo + Eliminar imaxe do grupo + Cambiar imaxe do grupo Crear grupo Por favor, introduce un nome para o grupo Engadir membros @@ -365,7 +402,12 @@ Engadir conta Eliminar conta Estás seguro de que queres eliminar os datos da túa conta? + Todos os datos da conta \"%s\" neste dispositivo vanse eliminar, incluíndo os axustes de cifrado extremo-a-extremo, contactos, conversas, mensaxes e multimedia. Esta acción non ten volta. Cambiando de conta... + Intenta conectar agora + + Fallou a configuración. Erro: %1$s + Reenviar a... @@ -404,6 +446,9 @@ Notificacións Mostrar Prioridade + Activa as notificación para as novas mensaxes + Motra o contido da mensaxe na notificación + Mostra a remitente e as primeiras palabras da mensaxe na notificación cor LED Son Mudo @@ -466,6 +511,26 @@ Cor por omisión Imaxe persoal Cor persoal + Exportación detida. + Elixe imaxe de perfil + Elixe a túa nova imaxe de perfil + Elimina a imaxe de perfil + + + + Resultados da busca + Non se atopan emojis + Usado recentemente + Persoas & Corpo + Animals & Natureza + Comida & Bebida + Actividade + Viaxes & Lugares + Obxectos + Símbolos + Bandeiras + + Eliminar mensaxes antigas @@ -530,6 +595,10 @@ As mensaxes desaparecerán após 1 semana. As mensaxes desaparecerán após 4 semanas. + + Protección do chat desactivada. + Protección do chat activada. + Bloqueo de pantalla Limita o acceso co bloqueo de pantalla Android ou impresión dactilar; para evitar mostrar o contido, por favor activa \"Seguridade de Pantalla\". @@ -543,8 +612,10 @@ Código QR + Cargar código QR como imaxe Escanear código QR Mantén a cámara sobre o código QR. + Non se puido descodificar o código QR Queres unirte ao grupo \"%1$s\"? A impresión escaneada non concorda coa última vista para %1$s. Este código QR contén unha imprsión dixital pero non un enderezo de correo.\n\nPara unha verificación fora de liña, por favor establece unha conexión cifrada co correspondente. @@ -572,6 +643,9 @@ Cambiaron os axustes para %1$s. Os grupos verificados (experimental) proporcionan seguridade contra ataques activos. As integrantes son verificadas cun segundo factor por outros membros e as mensaxes van sempre cifradas E2E. + Copiado o url do QR ó portapapeis + + %1$d novas mensaxes en %2$d conversas Marcar como lido @@ -599,6 +673,9 @@ Mensaxe cifrada + + Esta é a app oficial de Escritorio para Delta Chat + Este software está baixo licenza GNU GPL versión 3 e o código fonte está dispoñible en GitHub. Benvida a Delta Chat Contas coñecidas Idioma @@ -653,6 +730,7 @@ Eliminar a conversa? Correo-e requerido. Eliminar esta conexión? Borrarase todo, incluíndo os axustes de cifrado, contactos, conversas, mensaxes e ficheiros de medios. Esta acción non ten volta atrás. + Email: %1$s\nTamaño: %2$s\nRuta: %3$s eu Membros do grupo Membros potenciais do grupo (fóra do grupo) @@ -674,6 +752,9 @@ Estado de entrega inválido Accións da mensaxe Vista previa do fondo + Activada a desaparición de mensaxes + + Conceder acceso a cámara permíteche tomar fotos e vídeos. Permitir o acceso a libreta de enderezos permíteche conversar con contactos do dispositivo. @@ -682,6 +763,10 @@ Delta Chat quere gardar imaxes na galería de fotos. + + Notificacións en segundo plano + Utiliza a conexión en segundo plano co servidor e require que ignores as optimizacións de batería. + Para manter a conexión co servidor de correo e recibir mensaxes en segundo plano, ignora as optimizacións de batería no seguinte paso.\n\nDelta Chat utiliza moi poucos recursos e preocúpase de non esgotar a batería. Conexión estable en segundo plano Require unha notificación permanente diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index d4e36e9f5..965b73404 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -10,6 +10,8 @@ Nyala Mati Default + Default (%1$s) + Default (sama seperti di atas) Menurut pesanan Tidak ada Otomatis @@ -33,6 +35,7 @@ Simpan Chat Media + Profil Menu utama Mulai obrolan Tunjukkan kata kunci @@ -148,12 +151,15 @@ Tambah lampiran Tinggalkan grup Hapus obrolan + Apakah anda yakin ingin menghapus \"%1$s\"? Hapus pesan Hapus gambar + Hapus kontak Hapus semua lokasi? Hapus lokasi ini? Detail pesan Kopi ke papan klip + Salin yang dipilih Salin pranala Tempelkan dari papan klip Teruskan pesan @@ -196,6 +202,7 @@ Sematkan Lepas pin + Pesan orisinil tidak ditemukan Balas secara privat Diamkan untuk 1 jam @@ -214,6 +221,7 @@ Berkas disimpan ke \"%1$s\". Obrolan video + Undang %1$s ke obrolan video? %1$s diundang ke obrolan video. Anda diundang ke obrolan video. Ketuk untuk bergabung From 6e9df3c98aa5723e1c4b727121c50685f73fe062 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 1 Nov 2020 01:24:36 +0100 Subject: [PATCH 5/8] adapt paths in release-checklist.md --- docs/release-checklist.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/release-checklist.md b/docs/release-checklist.md index ed0367bad..dc9e15353 100644 --- a/docs/release-checklist.md +++ b/docs/release-checklist.md @@ -3,17 +3,17 @@ on the command-line: 1. update core rust submodule, if needed: - $ ./tools/update-core.sh + $ ./scripts/update-core.sh depending on how much you trust in rust, you might want to do a - ./tools/clean-core.sh before building + ./scripts/clean-core.sh before building 2. $ ./ndk-make.sh this will take some time - meanwhile we're doing some housekeeping: 3. update translations and local help: - $ ./tools/tx-pull-translations.sh - $ cd ../deltachat-pages; ./tools/create-local-help.py; cd ../deltachat-android + $ ./scripts/tx-pull-translations.sh + $ cd ../deltachat-pages; ./scripts/create-local-help.py; cd ../deltachat-android 4. add a device message to ConversationListActivity::onCreate() and update CHANGELOG.md @@ -39,7 +39,7 @@ on success, the generated APK is at # Upload APK to get.delta.chat -7. $ ./tools/upload-release.sh VERSION +7. $ ./scripts/upload-release.sh VERSION 8. a) Test the APK yourself. The "Testing checklist" gives some hints. From 8e724e8a76a69754b2c42d11e24644a1a65b83d9 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 24 Oct 2020 23:03:41 +0200 Subject: [PATCH 6/8] update changelog, add device message for 1.14 --- CHANGELOG.md | 41 +++++++++++++++++++ res/values/strings.xml | 1 + .../securesms/ConversationListActivity.java | 9 ++-- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af3c7d0ee..984e7afb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Delta Chat Android Changelog +## v1.14.0 +2020-11 + +* new swipe-to-reply option +* disappearing messages: select for any chat the lifetime of the messages +* chat opens at the position of the first unseen message +* add known contacts from the IMAP-server to the local addressbook on configure +* direct forwarding to "saved messags" - save one tap and stay in context :) +* long tap in contact-list allows opening "profile" directly +* allow forwarding to multiple archived chats +* enable encryption in groups if preferred by the majority of recipients + (previously, encryption was only enabled if everyone preferred i) +* add explicit switches for handling background connections + at "Settings / Notifications" +* ask directly after configure for the permission to run in background + to get notifications +* speed up chatlist-view +* speed up configuration +* try multiple servers from autoconfig +* prefix log by a hint about sensitive information +* check system clock and app date for common issues +* prepare to remove screen lock as it adds only few protection + while having issues on its own +* improve multi-device notification handling +* improve detection and handling of video and audio messages +* hide unused functions in "Saved messages" and "Device chat" profiles +* remove unneeded information when copying a single message to the clipboard +* bypass some limits for maximum number of recipients +* fix launch if there is an ongoing process +* fix: update relative times in chatlist once a minute +* fix: hide keyboard when leaving edit-name +* fix: connect immediately to an account scanned from a qr-code +* fix errors that are not shown during configuring +* fix keyboard position on Android Q +* fix mistakenly unarchived chats +* fix: tons of improvements affecting sending and receiving messages, see + https://github.com/deltachat/deltachat-core-rust/blob/master/CHANGELOG.md +* update provider database and dependencies +* add Slovak translation, update other translations + + ## v1.12.5 2020-08 diff --git a/res/values/strings.xml b/res/values/strings.xml index a793db96a..121172f4d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -772,5 +772,6 @@ Requires a permanent notification Tap here to receive messages while Delta Chat is in the background. You already allowed Delta Chat to receive messages in the background.\n\nIf messages still do not arrive in background, please also check your system settings. + Some highlights of the 1.14 update:\n\n🧹 Swipe to reply: To answer a concrete message, just swipe it right (_not_ here! you cannot answer here :) You\'ll see a quote above the compose line and can continue writing your message as usual.\n\n🔥 Disappearing messages - the time has come :) Any chat can now be configured to delete sent and received messages after some time. Just select \"Disappearing messages\" from the chat\'s menu (again: _not_ here :)\n\n👆 Chats open at first unseen message\n\n💾 Forward things to \"Saved messages\" directly and faster (_this_ can be tried here: long-tap this message and then the arrow top-right :)\n\n🎃 Finally, we\'ve again frightened many bugs! Lots were so scared, they won\'t came back. diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index f3fd16fda..a1ea143ca 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -31,6 +31,8 @@ import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.TooltipCompat; import com.b44t.messenger.DcChat; +import com.b44t.messenger.DcContext; +import com.b44t.messenger.DcMsg; import com.google.zxing.integration.android.IntentIntegrator; import com.google.zxing.integration.android.IntentResult; @@ -87,9 +89,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. - //DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); - //msg.setText(getString(R.string.update_1_10_android) + "\n\n" + "https://delta.chat/en/2020-06-24-releases"); - //dcContext.addDeviceMsg("update_1_10b_android", msg); // addDeviceMessage() makes sure, messages with the same id are not added twice + DcContext dcContext = DcHelper.getContext(this); + DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); + msg.setText(getString(R.string.update_1_14_android) + " https://delta.chat/en/download#changelogs"); + dcContext.addDeviceMsg("update_1_14j_android", msg); // addDeviceMessage() makes sure, messages with the same id are not added twice // create view setContentView(R.layout.conversation_list_activity); From 6e72932e11ea16cc61cd0b9b48d322ce79b4aa7a Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 1 Nov 2020 01:08:13 +0100 Subject: [PATCH 7/8] bump version to 1.14.0 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 27e65001f..0d53556e9 100644 --- a/build.gradle +++ b/build.gradle @@ -89,8 +89,8 @@ android { } defaultConfig { - versionCode 594 - versionName "1.13.5" + versionCode 595 + versionName "1.14.0" applicationId "com.b44t.messenger" multiDexEnabled true From 4316354163f7ad26d071ffde33a871e59236c306 Mon Sep 17 00:00:00 2001 From: bjoern Date: Sun, 1 Nov 2020 01:18:49 +0100 Subject: [PATCH 8/8] Update res/values/strings.xml Co-authored-by: link2xt --- 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 121172f4d..0ce26a885 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -772,6 +772,6 @@ Requires a permanent notification Tap here to receive messages while Delta Chat is in the background. You already allowed Delta Chat to receive messages in the background.\n\nIf messages still do not arrive in background, please also check your system settings. - Some highlights of the 1.14 update:\n\n🧹 Swipe to reply: To answer a concrete message, just swipe it right (_not_ here! you cannot answer here :) You\'ll see a quote above the compose line and can continue writing your message as usual.\n\n🔥 Disappearing messages - the time has come :) Any chat can now be configured to delete sent and received messages after some time. Just select \"Disappearing messages\" from the chat\'s menu (again: _not_ here :)\n\n👆 Chats open at first unseen message\n\n💾 Forward things to \"Saved messages\" directly and faster (_this_ can be tried here: long-tap this message and then the arrow top-right :)\n\n🎃 Finally, we\'ve again frightened many bugs! Lots were so scared, they won\'t came back. + Some highlights of the 1.14 update:\n\n🧹 Swipe to reply: To answer a concrete message, just swipe it right (not here! you cannot answer here 😛) You\'ll see a quote above the compose line and can continue writing your message as usual.\n\n🔥 Disappearing messages ­- the time has come 😀. Any chat can now be configured to delete sent and received messages after some time. Just select \"Disappearing messages\" from the chat\'s menu (again: not here)\n\n👆 Chats open at first unseen message\n\n💾 Forward things to \"Saved messages\" directly and faster (this can be tried here: long-tap this message and then the arrow top-right)\n\n🎃 Finally, we\'ve again frightened many bugs! Lots were so scared, they won\'t come back.