Browse Source

Playlist drag and drop: fix drop to last item no work

HOME 2 years ago
parent
commit
c4bb8689c7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      FNZCM/FNZCM.BlazorWasm/Helpers/PlaylistHelper.cs

+ 1 - 1
FNZCM/FNZCM.BlazorWasm/Helpers/PlaylistHelper.cs

@@ -144,7 +144,7 @@ namespace FNZCM.BlazorWasm.Helpers
         {
         {
             if (index < 0) return;
             if (index < 0) return;
             var l = new ObservableCollection<FePlaylist>(PlaylistTableStore);
             var l = new ObservableCollection<FePlaylist>(PlaylistTableStore);
-            if (index >= l.Count - 1) return;
+            if (index >= l.Count) return;
             var item = l.FirstOrDefault(p => p.Id == id);
             var item = l.FirstOrDefault(p => p.Id == id);
             if (item == null) return;
             if (item == null) return;
             var oldIndex = l.IndexOf(item);
             var oldIndex = l.IndexOf(item);