Workaround selection tracker crash

This commit is contained in:
M66B 2018-12-03 18:37:03 +01:00
parent 2bfd73327c
commit f245031488
1 changed files with 7 additions and 2 deletions

View File

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