From de266b1cdec8d26ecdc3e5dcce5839a388819a32 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Sep 2018 05:10:46 +0000 Subject: [PATCH] Check for single recipient when encrypting --- .idea/misc.xml | 2 +- app/src/main/java/eu/faircode/email/FragmentCompose.java | 3 +++ app/src/main/res/values-af/strings.xml | 1 + app/src/main/res/values-ar-rBH/strings.xml | 1 + app/src/main/res/values-ar-rEG/strings.xml | 1 + app/src/main/res/values-ar-rSA/strings.xml | 1 + app/src/main/res/values-ar-rYE/strings.xml | 1 + app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-ca/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-el/strings.xml | 1 + app/src/main/res/values-en/strings.xml | 1 + app/src/main/res/values-es-rES/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-he/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-ko/strings.xml | 1 + app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-no/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt-rPT/strings.xml | 1 + app/src/main/res/values-ro/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv-rSE/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-vi/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 39 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index caad359b..77d47004 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -30,7 +30,7 @@ - + diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 9a01d54f..b84c6359 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1011,6 +1011,9 @@ public class FragmentCompose extends FragmentEx { if (openPgpConnection == null || !openPgpConnection.isBound()) throw new IllegalArgumentException(getString(R.string.title_no_openpgp)); + if (ato.length != 1) + throw new IllegalArgumentException(context.getString(R.string.title_to_one)); + Intent data = new Intent(); data.setAction(OpenPgpApi.ACTION_ENCRYPT); data.putExtra(OpenPgpApi.EXTRA_USER_IDS, new String[]{ato[0].getAddress()}); diff --git a/app/src/main/res/values-af/strings.xml b/app/src/main/res/values-af/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-af/strings.xml +++ b/app/src/main/res/values-af/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ar-rBH/strings.xml b/app/src/main/res/values-ar-rBH/strings.xml index cc10098b..a6efddd3 100644 --- a/app/src/main/res/values-ar-rBH/strings.xml +++ b/app/src/main/res/values-ar-rBH/strings.xml @@ -162,6 +162,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ar-rEG/strings.xml b/app/src/main/res/values-ar-rEG/strings.xml index cc10098b..a6efddd3 100644 --- a/app/src/main/res/values-ar-rEG/strings.xml +++ b/app/src/main/res/values-ar-rEG/strings.xml @@ -162,6 +162,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ar-rSA/strings.xml b/app/src/main/res/values-ar-rSA/strings.xml index cc10098b..a6efddd3 100644 --- a/app/src/main/res/values-ar-rSA/strings.xml +++ b/app/src/main/res/values-ar-rSA/strings.xml @@ -162,6 +162,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ar-rYE/strings.xml b/app/src/main/res/values-ar-rYE/strings.xml index cc10098b..a6efddd3 100644 --- a/app/src/main/res/values-ar-rYE/strings.xml +++ b/app/src/main/res/values-ar-rYE/strings.xml @@ -162,6 +162,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index cc10098b..a6efddd3 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -162,6 +162,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 2476bb8e..e924d4a2 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -154,6 +154,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d819be34..30e1a98c 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -146,6 +146,7 @@ Dekryptér Afsender mangler Modtager mangler + One recipient expected Vedhæftede filer indlæses stadig Kladde slettet Kladde gemt diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 7c7b78ee..16e8743d 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -146,6 +146,7 @@ Entschlüsseln Absender fehlt Empfänger fehlt + One recipient expected Anhänge werden noch geladen Entwurf gelöscht Entwurf gespeichert diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 3302c2cc..7ac25a95 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -146,6 +146,7 @@ Déchiffrer Expéditeur manquant Destinataire manquant + One recipient expected Pièces jointes en cours de chargement Brouillon supprimé Brouillon enregistré diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 1a150a33..aa72ad14 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -154,6 +154,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 09fe1f94..7457a3bd 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -146,6 +146,7 @@ Decrypt Mittente mancante Destinatario mancante + One recipient expected Allegati ancora in fase di caricamento Bozza cestinata Bozza salvata diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 1a150a33..aa72ad14 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -154,6 +154,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 0cea958a..d94ccd08 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -142,6 +142,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 0cea958a..d94ccd08 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -142,6 +142,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-no/strings.xml b/app/src/main/res/values-no/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-no/strings.xml +++ b/app/src/main/res/values-no/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 46bef068..7429464f 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -154,6 +154,7 @@ Odszyfruj Brak nadawcy Brak adresata + One recipient expected Załączniki są wciąż ładowane Szkice usunięte Szkic zapisany diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 1d02711b..71c2aab4 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -146,6 +146,7 @@ Decrypt Remetente faltante Destinatário faltante + One recipient expected Attachments still loading Rascunho excluído Rascunho salvo diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 25c04eac..92472bb7 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -150,6 +150,7 @@ Decriptare Expeditor lipsă Destinatar lipsă + One recipient expected Atașamentele încă se încarcă Ciornă trimisă la gunoi Ciornă salvată diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2476bb8e..e924d4a2 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -154,6 +154,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index a6179f98..4a26319f 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -150,6 +150,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index 71f6f61e..5b63fc95 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -146,6 +146,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 9b4c50c7..060be353 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -146,6 +146,7 @@ Şifre çöz Gönderici Eksik Alıcı eksik + One recipient expected Ekler hala yükleniyor Taslak çöp kutusuna atıldı Taslak kaydedildi diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 2476bb8e..e924d4a2 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -154,6 +154,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 0cea958a..d94ccd08 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -142,6 +142,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4f7bf10f..4d836a0b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -142,6 +142,7 @@ 解密 缺少发件人 缺少收件人 + One recipient expected 附件加载中 草稿已删除 草稿已保存 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0cea958a..d94ccd08 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -142,6 +142,7 @@ Decrypt Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e886ef6c..1c8f2f1d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -173,6 +173,7 @@ Sender missing Recipient missing + One recipient expected Attachments still loading Draft trashed Draft saved