mirror of https://github.com/M66B/FairEmail.git
Too bad it didn't fix the AndroidX crash
This commit is contained in:
parent
f40d7fe7e8
commit
d950157f3b
|
@ -476,8 +476,6 @@ public class FragmentMessages extends FragmentBase {
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (selectionPredicate != null)
|
||||
selectionPredicate.destroy();
|
||||
selectionTracker = null;
|
||||
super.onDestroy();
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
|
||||
public class SelectionPredicateMessage extends SelectionTracker.SelectionPredicate<Long> {
|
||||
private boolean enabled;
|
||||
private boolean destroyed;
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
SelectionPredicateMessage(RecyclerView recyclerView) {
|
||||
this.enabled = true;
|
||||
this.destroyed = false;
|
||||
this.recyclerView = recyclerView;
|
||||
}
|
||||
|
||||
|
@ -38,10 +36,6 @@ public class SelectionPredicateMessage extends SelectionTracker.SelectionPredica
|
|||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
this.destroyed = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSetStateForKey(@NonNull Long key, boolean nextState) {
|
||||
if (!enabled)
|
||||
|
@ -72,6 +66,6 @@ public class SelectionPredicateMessage extends SelectionTracker.SelectionPredica
|
|||
|
||||
@Override
|
||||
public boolean canSelectMultiple() {
|
||||
return !destroyed;
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue