Fixed playlist reorder error,

This commit is contained in:
stonegate 2020-08-09 23:12:33 +08:00
parent f8db1b756f
commit ff719ab108
1 changed files with 4 additions and 3 deletions

View File

@ -244,10 +244,11 @@ class _PlaylistPageState extends State<PlaylistPage> {
if (newIndex > oldIndex) { if (newIndex > oldIndex) {
newIndex -= 1; newIndex -= 1;
} }
audio.reorderPlaylist(newIndex, oldIndex); audio.reorderPlaylist(oldIndex, newIndex);
final episodeRemove = episodes.removeAt(oldIndex); // final episodeRemove = episodes.removeAt(oldIndex);
// print(episodeRemove.title);
setState(() { setState(() {
episodes.insert(newIndex, episodeRemove); // episodes.insert(newIndex, episodeRemove);
}); });
}, },
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,