Fix #1305 An object (image), "shared" to Delta Chat once, appears again forever in Chat editors until app is closed

The problem was that the intent still had the share flag and data.

A draft is now initialized (and stays) so that the user can return to sending later.
This commit is contained in:
Hocuri 2020-04-24 10:17:40 +02:00
parent 4b200fab63
commit 51a443a184
No known key found for this signature in database
GPG key ID: 0332F2F8B520C472

View file

@ -548,9 +548,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (isRelayingMessageContent(this)) {
if (isSharing(this)) {
dcContext.setDraft(dcChat.getId(), null);
attachmentManager.cleanup();
composeText.setText("");
}
finish();
return;
@ -662,6 +660,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void handleSharing() {
ArrayList<Uri> uriList = RelayUtil.getSharedUris(this);
RelayUtil.resetRelayingMessageContent(this); // This avoids that the shared text appears again if another chat is opened
if (uriList == null) return;
if (uriList.size() > 1) {
String message = String.format(getString(R.string.share_multiple_attachments), uriList.size());