fix attachments getting lost when switching to chat during call

fixes #3854
This commit is contained in:
Daniel Gultsch 2020-08-05 21:31:54 +02:00
parent 59d7bb63e9
commit 7d2a7d536d
2 changed files with 7 additions and 4 deletions

View File

@ -2034,9 +2034,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
toggleInputMethod(); toggleInputMethod();
} }
public void reInit(Conversation conversation, Bundle extras) { public void reInit(final Conversation conversation, final Bundle extras) {
QuickLoader.set(conversation.getUuid()); QuickLoader.set(conversation.getUuid());
this.saveMessageDraftStopAudioPlayer(); final boolean changedConversation = this.conversation != conversation;
if (changedConversation) {
this.saveMessageDraftStopAudioPlayer();
}
this.clearPending(); this.clearPending();
if (this.reInit(conversation, extras != null)) { if (this.reInit(conversation, extras != null)) {
if (extras != null) { if (extras != null) {

View File

@ -266,8 +266,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
} }
private boolean processViewIntent(Intent intent) { private boolean processViewIntent(Intent intent) {
String uuid = intent.getStringExtra(EXTRA_CONVERSATION); final String uuid = intent.getStringExtra(EXTRA_CONVERSATION);
Conversation conversation = uuid != null ? xmppConnectionService.findConversationByUuid(uuid) : null; final Conversation conversation = uuid != null ? xmppConnectionService.findConversationByUuid(uuid) : null;
if (conversation == null) { if (conversation == null) {
Log.d(Config.LOGTAG, "unable to view conversation with uuid:" + uuid); Log.d(Config.LOGTAG, "unable to view conversation with uuid:" + uuid);
return false; return false;