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);
|
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;
|
this.correctingMessage = correctingMessage;
|
||||||
|
return corrected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Message getCorrectingMessage() {
|
public Message getCorrectingMessage() {
|
||||||
|
|
|
@ -395,7 +395,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||||
message.setBody(body);
|
message.setBody(body);
|
||||||
message.setEdited(message.getUuid());
|
message.setEdited(message.getUuid());
|
||||||
message.setUuid(UUID.randomUUID().toString());
|
message.setUuid(UUID.randomUUID().toString());
|
||||||
conversation.setCorrectingMessage(null);
|
|
||||||
}
|
}
|
||||||
switch (conversation.getNextEncryption()) {
|
switch (conversation.getNextEncryption()) {
|
||||||
case Message.ENCRYPTION_OTR:
|
case Message.ENCRYPTION_OTR:
|
||||||
|
@ -1073,7 +1072,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||||
|
|
||||||
protected void messageSent() {
|
protected void messageSent() {
|
||||||
mSendingPgpMessage.set(false);
|
mSendingPgpMessage.set(false);
|
||||||
mEditMessage.setText("");
|
mEditMessage.getEditableText().clear();
|
||||||
|
conversation.setCorrectingMessage(null);
|
||||||
updateChatMsgHint();
|
updateChatMsgHint();
|
||||||
new Handler().post(new Runnable() {
|
new Handler().post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue