fix(player): swipe left to advance and right to return

This commit is contained in:
zarzet committed 2026-09-27 00:59:40 +07:00
1 parent fa4a03c754
commit 01adae5b9d
3 files changed
+25 -8

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ class _PlayerTrackSwipeState extends State<PlayerTrackSwipe>
MediaItem? _neighbor(double direction) {
if (widget.currentIndex < 0) return null;
final at = widget.currentIndex + (direction > 0 ? 1 : -1);
final at = widget.currentIndex + (direction < 0 ? 1 : -1);
return at >= 0 && at < widget.queue.length ? widget.queue[at] : null;
}