mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-27 11:12:16 -05:00
fixed messages vanishing after pgp raised error on editing a message
This commit is contained in:
parent
58595fccfe
commit
5c789b75cc
@ -356,8 +356,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||
setAttribute(ATTRIBUTE_CRYPTO_TARGETS, acceptedTargets);
|
||||
}
|
||||
|
||||
public void setCorrectingMessage(Message correctingMessage) {
|
||||
public boolean setCorrectingMessage(Message correctingMessage) {
|
||||
boolean corrected = this.correctingMessage != null && correctingMessage == null;
|
||||
this.correctingMessage = correctingMessage;
|
||||
return corrected;
|
||||
}
|
||||
|
||||
public Message getCorrectingMessage() {
|
||||
|
@ -395,7 +395,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
message.setBody(body);
|
||||
message.setEdited(message.getUuid());
|
||||
message.setUuid(UUID.randomUUID().toString());
|
||||
conversation.setCorrectingMessage(null);
|
||||
}
|
||||
switch (conversation.getNextEncryption()) {
|
||||
case Message.ENCRYPTION_OTR:
|
||||
@ -1073,7 +1072,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
|
||||
protected void messageSent() {
|
||||
mSendingPgpMessage.set(false);
|
||||
mEditMessage.setText("");
|
||||
mEditMessage.getEditableText().clear();
|
||||
conversation.setCorrectingMessage(null);
|
||||
updateChatMsgHint();
|
||||
new Handler().post(new Runnable() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user