aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-01 18:52:27 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-01 18:52:27 +0200
commit8ea73feec405dffc47e5273ab034cb40af327a85 (patch)
treea5f84944c29cf29c45bf015574f534ab5fef9c51
parent304f8672d9ee8624f34209e62595eab2d1527f6f (diff)
added warning when public keys are missing
Diffstat (limited to '')
-rw-r--r--res/values/strings.xml1
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java6
2 files changed, 7 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 46b0cce1..d0f68fdd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -232,4 +232,5 @@
<string name="server_info_stream_management">Stream Management</string>
<string name="hours">hours</string>
<string name="mins">mins</string>
+ <string name="missing_public_keys">Missing public key announcements</string>
</resources> \ No newline at end of file
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index a2b272a1..f23a6bfe 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -34,6 +34,7 @@ import android.text.Editable;
import android.text.Selection;
import android.util.DisplayMetrics;
import android.util.Log;
+import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -714,6 +715,11 @@ public class ConversationFragment extends Fragment {
}
} else {
if (conversation.getMucOptions().pgpKeysInUse()) {
+ if (!conversation.getMucOptions().everybodyHasKeys()) {
+ Toast warning = Toast.makeText(getActivity(), R.string.missing_public_keys, Toast.LENGTH_LONG);
+ warning.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
+ warning.show();
+ }
activity.encryptTextMessage();
} else {
showNoPGPKeyDialog(true,new DialogInterface.OnClickListener() {