diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-10-05 21:22:58 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-10-05 21:22:58 +0200 |
commit | 28a47fcc2f67e2385a90237e9bdf2d360ee96f75 (patch) | |
tree | e1fe4ec5a3b5620d6c2c4b8b0399f7ca34b7d67c /src/main/java/de/pixart/messenger/ui | |
parent | e7d59858ae3354ca3945496bd297351e71b3c9d2 (diff) |
fixed omemo shown as unavailable in 1:1 chats
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 7 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index cafd18f00..478156bea 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -623,15 +623,16 @@ public class ConversationActivity extends XmppActivity private boolean quickOmemoDebugger(Conversation c) { if (c != null) { + boolean single = c.getMode() == Conversation.MODE_SINGLE; AxolotlService axolotlService = c.getAccount().getAxolotlService(); Pair<AxolotlService.AxolotlCapability,Jid> capabilityJidPair = axolotlService.isConversationAxolotlCapableDetailed(c); switch (capabilityJidPair.first) { case MISSING_PRESENCE: - Toast.makeText(ConversationActivity.this,getString(R.string.missing_presence_subscription_with_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show(); + Toast.makeText(ConversationActivity.this,single ? getString(R.string.missing_presence_subscription) : getString(R.string.missing_presence_subscription_with_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show(); return true; case MISSING_KEYS: - Toast.makeText(ConversationActivity.this,getString(R.string.missing_keys_from_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show(); - return true; + Toast.makeText(ConversationActivity.this,single ? getString(R.string.missing_omemo_keys) : getString(R.string.missing_keys_from_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show(); + return true; case WRONG_CONFIGURATION: Toast.makeText(ConversationActivity.this,R.string.wrong_conference_configuration, Toast.LENGTH_SHORT).show(); return true; diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 4ac0c3ed9..f0db05626 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -53,6 +53,7 @@ import de.pixart.messenger.entities.DownloadableFile; import de.pixart.messenger.entities.Message; import de.pixart.messenger.entities.Message.FileParams; import de.pixart.messenger.entities.Transferable; +import de.pixart.messenger.persistance.FileBackend; import de.pixart.messenger.ui.ConversationActivity; import de.pixart.messenger.ui.ShowFullscreenMessageActivity; import de.pixart.messenger.ui.widget.ClickableMovementMethod; @@ -786,7 +787,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { Uri uri; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { try { - uri = FileProvider.getUriForFile(activity, "de.pixart.messenger.files", file); + uri = FileProvider.getUriForFile(activity, FileBackend.CONVERSATIONS_FILE_PROVIDER, file); } catch (IllegalArgumentException e) { Toast.makeText(activity,activity.getString(R.string.no_permission_to_access_x,file.getAbsolutePath()), Toast.LENGTH_SHORT).show(); return; |