mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-26 01:09:13 -05:00
only dismiss sent message after encryption
This commit is contained in:
parent
cb5393c32f
commit
5f4471a45e
@ -1542,21 +1542,30 @@ public class ConversationActivity extends XmppActivity
|
|||||||
new UiCallback<Message>() {
|
new UiCallback<Message>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void userInputRequried(PendingIntent pi,
|
public void userInputRequried(PendingIntent pi,Message message) {
|
||||||
Message message) {
|
ConversationActivity.this.runIntent(pi,ConversationActivity.REQUEST_SEND_MESSAGE);
|
||||||
ConversationActivity.this.runIntent(pi,
|
|
||||||
ConversationActivity.REQUEST_SEND_MESSAGE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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) {
|
||||||
|
mConversationFragment.messageSent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void error(int error, Message message) {
|
public void error(final int error, Message message) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(ConversationActivity.this,
|
||||||
|
R.string.unable_to_connect_to_keychain,
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -916,7 +916,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void messageSent() {
|
protected void messageSent() {
|
||||||
mEditMessage.setText("");
|
mEditMessage.setText("");
|
||||||
updateChatMsgHint();
|
updateChatMsgHint();
|
||||||
new Handler().post(new Runnable() {
|
new Handler().post(new Runnable() {
|
||||||
@ -1172,7 +1172,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void success(Contact contact) {
|
public void success(Contact contact) {
|
||||||
messageSent();
|
|
||||||
activity.encryptTextMessage(message);
|
activity.encryptTextMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1210,7 +1209,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
warning.show();
|
warning.show();
|
||||||
}
|
}
|
||||||
activity.encryptTextMessage(message);
|
activity.encryptTextMessage(message);
|
||||||
messageSent();
|
|
||||||
} else {
|
} else {
|
||||||
showNoPGPKeyDialog(true,
|
showNoPGPKeyDialog(true,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
|
Loading…
Reference in New Issue
Block a user