fix media preview in tablet mode

This commit is contained in:
Daniel Gultsch 2018-09-13 18:48:21 +02:00
parent 724f86f054
commit e0266d0efb
2 changed files with 6 additions and 0 deletions

View File

@ -1865,6 +1865,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} }
updateChatState(this.conversation, msg); updateChatState(this.conversation, msg);
messageListAdapter.stopAudioPlayer(); messageListAdapter.stopAudioPlayer();
mediaPreviewAdapter.clearPreviews();
toggleInputMethod();
} }
public void reInit(Conversation conversation, Bundle extras) { public void reInit(Conversation conversation, Bundle extras) {

View File

@ -166,6 +166,10 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte
return mediaPreviews; return mediaPreviews;
} }
public void clearPreviews() {
this.mediaPreviews.clear();
}
class MediaPreviewViewHolder extends RecyclerView.ViewHolder { class MediaPreviewViewHolder extends RecyclerView.ViewHolder {
private final MediaPreviewBinding binding; private final MediaPreviewBinding binding;