|
|
@ -1415,6 +1415,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
selectionTracker.addObserver(new SelectionTracker.SelectionObserver<Long>() {
|
|
|
|
selectionTracker.addObserver(new SelectionTracker.SelectionObserver<Long>() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onSelectionChanged() {
|
|
|
|
public void onSelectionChanged() {
|
|
|
|
|
|
|
|
if (!getViewLifecycleOwner().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
FragmentActivity activity = getActivity();
|
|
|
|
FragmentActivity activity = getActivity();
|
|
|
|
if (activity != null)
|
|
|
|
if (activity != null)
|
|
|
|
activity.invalidateOptionsMenu();
|
|
|
|
activity.invalidateOptionsMenu();
|
|
|
@ -1424,6 +1427,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onItemStateChanged(@NonNull Long key, boolean selected) {
|
|
|
|
public void onItemStateChanged(@NonNull Long key, boolean selected) {
|
|
|
|
|
|
|
|
if (!getViewLifecycleOwner().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
int pos = adapter.getPositionForKey(key);
|
|
|
|
int pos = adapter.getPositionForKey(key);
|
|
|
|
if (pos == NO_POSITION)
|
|
|
|
if (pos == NO_POSITION)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|