From 66521a716bba8500b1ea77be7715449adaba1a26 Mon Sep 17 00:00:00 2001 From: Jan Wiebe de Haan Date: Tue, 23 Feb 2021 15:01:10 +0100 Subject: [PATCH] Fix collection changes --- MediaManager/Platforms/Android/Queue/QueueDataAdapter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaManager/Platforms/Android/Queue/QueueDataAdapter.cs b/MediaManager/Platforms/Android/Queue/QueueDataAdapter.cs index 4ec09596..75fc66cc 100644 --- a/MediaManager/Platforms/Android/Queue/QueueDataAdapter.cs +++ b/MediaManager/Platforms/Android/Queue/QueueDataAdapter.cs @@ -69,12 +69,12 @@ private void MediaQueue_CollectionChanged(object sender, System.Collections.Spec //move when new is before old if (newBeginIndex < oldBeginIndex) - for (int i = 0; i > e.NewItems.Count; i++) + for (int i = 0; i < e.NewItems.Count; i++) _mediaSource.MoveMediaSource(oldEndIndex, newBeginIndex); //move when new is after old else if (newBeginIndex > oldBeginIndex) - for (int i = 0; i > e.NewItems.Count; i++) + for (int i = 0; i < e.NewItems.Count; i++) _mediaSource.MoveMediaSource(oldBeginIndex, newEndIndex); } else @@ -92,7 +92,7 @@ private void MediaQueue_CollectionChanged(object sender, System.Collections.Spec case System.Collections.Specialized.NotifyCollectionChangedAction.Replace: if (e.NewItems.Count > 1) { - for (int i = 0; i > e.NewItems.Count; i++) + for (int i = 0; i < e.NewItems.Count; i++) _mediaSource.RemoveMediaSource(e.OldStartingIndex); } else