Don't swap, move
This commit is contained in:
parent
166c067194
commit
098d82da05
@ -165,7 +165,7 @@ public class QueueFragment extends Fragment {
|
||||
case MOVED:
|
||||
int from = FeedItemUtil.indexOfItemWithId(queue, event.item.getId());
|
||||
int to = event.position;
|
||||
Collections.swap(queue, from, to);
|
||||
queue.add(to, queue.remove(from));
|
||||
recyclerAdapter.notifyItemMoved(from, to);
|
||||
break;
|
||||
}
|
||||
@ -365,7 +365,7 @@ public class QueueFragment extends Fragment {
|
||||
int from = viewHolder.getAdapterPosition();
|
||||
int to = target.getAdapterPosition();
|
||||
Log.d(TAG, "move(" + from + ", " + to + ")");
|
||||
Collections.swap(queue, from, to);
|
||||
queue.add(to, queue.remove(from));
|
||||
recyclerAdapter.notifyItemMoved(from, to);
|
||||
DBWriter.moveQueueItem(from, to, false);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user