call messageSent() from UI thread after encrypting pgp message
This commit is contained in:
parent
ce336690e2
commit
30ed6b3cec
|
@ -1689,9 +1689,12 @@ public class ConversationActivity extends XmppActivity
|
|||
public void success(Message message) {
|
||||
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
||||
xmppConnectionService.sendMessage(message);
|
||||
if (mConversationFragment != null) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mConversationFragment.messageSent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1699,15 +1702,14 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue