Use selection snapshot

This commit is contained in:
M66B 2018-12-02 19:31:55 +01:00
parent 28541b07a6
commit 10f0334496
1 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.paging.LivePagedListBuilder;
import androidx.paging.PagedList;
import androidx.recyclerview.selection.MutableSelection;
import androidx.recyclerview.selection.Selection;
import androidx.recyclerview.selection.SelectionTracker;
import androidx.recyclerview.selection.StorageStrategy;
import androidx.recyclerview.widget.ItemTouchHelper;
@ -667,8 +667,7 @@ public class FragmentMessages extends FragmentEx {
}
private long[] getSelection() {
MutableSelection<Long> selection = new MutableSelection<>();
selectionTracker.copySelection(selection);
Selection<Long> selection = selectionTracker.getSelection();
long[] ids = new long[selection.size()];
int i = 0;