Workaround selection tracker crash

pull/146/head
M66B 6 years ago
parent 2bfd73327c
commit f245031488

@ -395,11 +395,16 @@ public class FragmentMessages extends FragmentEx {
selectionTracker.addObserver(new SelectionTracker.SelectionObserver() { selectionTracker.addObserver(new SelectionTracker.SelectionObserver() {
@Override @Override
public void onSelectionChanged() { public void onSelectionChanged() {
if (selectionTracker.hasSelection()) if (selectionTracker.hasSelection()) {
if (messages != null) {
messages.removeObservers(getViewLifecycleOwner());
messages = null;
}
fabMore.show(); fabMore.show();
else { } else {
fabMore.hide(); fabMore.hide();
predicate.clearAccount(); predicate.clearAccount();
loadMessages();
} }
} }
}); });

Loading…
Cancel
Save