diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:05:48 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:05:48 +0100 |
commit | 2c66a0e1a63479256b936d2157d3b384795730f2 (patch) | |
tree | 2fb63fc8db37c99d67bda153bd81ef46137a747b /src/main/java/de/pixart/messenger/ui | |
parent | b9f1a63fce7161c09f1d438768dfc0abe56dfd75 (diff) |
call messageSent() from UI thread after encrypting pgp message
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index efffb1d32..784f2e3ce 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -2016,9 +2016,12 @@ public class ConversationActivity extends XmppActivity public void success(Message message) { message.setEncryption(Message.ENCRYPTION_DECRYPTED); xmppConnectionService.sendMessage(message); - if (mConversationFragment != null) { - mConversationFragment.messageSent(); - } + runOnUiThread(new Runnable() { + @Override + public void run() { + mConversationFragment.messageSent(); + } + }); } @Override @@ -2026,15 +2029,13 @@ public class ConversationActivity extends XmppActivity runOnUiThread(new Runnable() { @Override public void run() { + mConversationFragment.doneSendingPgpMessage(); Toast.makeText(ConversationActivity.this, R.string.unable_to_connect_to_keychain, Toast.LENGTH_SHORT ).show(); } }); - if (mConversationFragment != null) { - mConversationFragment.doneSendingPgpMessage(); - } } }); } |