aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-06 18:21:31 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-06 18:21:31 +0200
commit0e5a0a07fd32d185d2d4c43df9494fafcace9208 (patch)
treee51be0fc1b2cf156327274a66589f2709c9f1e09 /src/eu/siacs/conversations/ui
parentdc0213710640911a796880fcd68a75d2b576918d (diff)
made otr a little bit more solid when there is no presence subscription
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/EditAccountActivity.java2
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java1
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java5
3 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/EditAccountActivity.java b/src/eu/siacs/conversations/ui/EditAccountActivity.java
index 6cee8386..bc946115 100644
--- a/src/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -325,7 +325,7 @@ public class EditAccountActivity extends XmppActivity {
this.mServerInfoPep.setText(R.string.server_info_unavailable);
}
String fingerprint = this.mAccount
- .getOtrFingerprint(getApplicationContext());
+ .getOtrFingerprint(xmppConnectionService);
if (fingerprint != null) {
this.mOtrFingerprintHeadline.setVisibility(View.VISIBLE);
this.mOtrFingerprint.setVisibility(View.VISIBLE);
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index 7d903e86..6ff83357 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -377,7 +377,6 @@ public abstract class XmppActivity extends Activity {
Toast toast = Toast.makeText(this,
R.string.missing_presence_updates,
Toast.LENGTH_LONG);
- toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
toast.show();
}
conversation.setNextPresence(null);
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index ccf25a33..074e38fb 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -495,6 +495,11 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
} else if (item.getEncryption() == Message.ENCRYPTION_DECRYPTION_FAILED) {
displayDecryptionFailed(viewHolder);
+ } else if (item.getEncryption() == Message.ENCRYPTION_OTR
+ && item.getStatus() == Message.STATUS_RECEPTION_FAILED
+ && item.getType() == Message.TYPE_TEXT) {
+ displayInfoMessage(viewHolder,
+ R.string.unable_to_decrypt_otr_message);
} else {
displayTextMessage(viewHolder, item);
}