mirror of https://github.com/M66B/FairEmail.git
Use selection snapshot
This commit is contained in:
parent
28541b07a6
commit
10f0334496
|
@ -64,7 +64,7 @@ import androidx.lifecycle.ViewModelProviders;
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
import androidx.paging.LivePagedListBuilder;
|
import androidx.paging.LivePagedListBuilder;
|
||||||
import androidx.paging.PagedList;
|
import androidx.paging.PagedList;
|
||||||
import androidx.recyclerview.selection.MutableSelection;
|
import androidx.recyclerview.selection.Selection;
|
||||||
import androidx.recyclerview.selection.SelectionTracker;
|
import androidx.recyclerview.selection.SelectionTracker;
|
||||||
import androidx.recyclerview.selection.StorageStrategy;
|
import androidx.recyclerview.selection.StorageStrategy;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
|
@ -667,8 +667,7 @@ public class FragmentMessages extends FragmentEx {
|
||||||
}
|
}
|
||||||
|
|
||||||
private long[] getSelection() {
|
private long[] getSelection() {
|
||||||
MutableSelection<Long> selection = new MutableSelection<>();
|
Selection<Long> selection = selectionTracker.getSelection();
|
||||||
selectionTracker.copySelection(selection);
|
|
||||||
|
|
||||||
long[] ids = new long[selection.size()];
|
long[] ids = new long[selection.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
Loading…
Reference in New Issue