Fixed playlist reorder error,
This commit is contained in:
parent
f8db1b756f
commit
ff719ab108
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue