do not show toast when activity is gone. fixes #4335
1 files changed, 5 insertions(+), 1 deletions(-) M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +5 -1
@@ 710,8 710,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } @Override public void error(final int error, Message message) { public void error(final int error, final Message message) { hidePrepareFileToast(prepareFileToast); final ConversationsActivity activity = ConversationFragment.this.activity; if (activity == null) { return; } activity.runOnUiThread(() -> activity.replaceToast(getString(error))); } });