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) {
|
public void success(Message message) {
|
||||||
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
||||||
xmppConnectionService.sendMessage(message);
|
xmppConnectionService.sendMessage(message);
|
||||||
if (mConversationFragment != null) {
|
runOnUiThread(new Runnable() {
|
||||||
mConversationFragment.messageSent();
|
@Override
|
||||||
}
|
public void run() {
|
||||||
|
mConversationFragment.messageSent();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1699,15 +1702,14 @@ public class ConversationActivity extends XmppActivity
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
mConversationFragment.doneSendingPgpMessage();
|
||||||
Toast.makeText(ConversationActivity.this,
|
Toast.makeText(ConversationActivity.this,
|
||||||
R.string.unable_to_connect_to_keychain,
|
R.string.unable_to_connect_to_keychain,
|
||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (mConversationFragment != null) {
|
|
||||||
mConversationFragment.doneSendingPgpMessage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue