mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
chore: fix playbutton not playing anything
This commit is contained in:
parent
98aff8f3b9
commit
92deb0cc6a
@ -119,6 +119,9 @@ class TrackViewFlexHeader extends HookConsumerWidget {
|
||||
style: defaultTextStyle.style.copyWith(
|
||||
color: palette.bodyTextColor,
|
||||
),
|
||||
textAlign: mediaQuery.mdAndDown
|
||||
? TextAlign.center
|
||||
: TextAlign.start,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
@ -107,7 +107,7 @@ class TrackViewHeaderButtons extends HookConsumerWidget {
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Colors.black,
|
||||
),
|
||||
minimumSize: const Size(150, 40)),
|
||||
label: Text(context.l10n.shuffle),
|
||||
icon: const Icon(SpotubeIcons.shuffle),
|
||||
onPressed: props.tracks.isEmpty ? null : onShuffle,
|
||||
@ -120,7 +120,7 @@ class TrackViewHeaderButtons extends HookConsumerWidget {
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: color.color,
|
||||
foregroundColor: color.bodyTextColor,
|
||||
),
|
||||
minimumSize: const Size(150, 40)),
|
||||
onPressed: isActive || props.tracks.isEmpty || isLoading.value
|
||||
? null
|
||||
: onPlay,
|
||||
|
@ -5,7 +5,7 @@ extension FetchAllTracks on InfiniteQuery<List<Track>, dynamic, int> {
|
||||
Future<List<Track>> fetchAllTracks({
|
||||
required Future<List<Track>> Function() getAllTracks,
|
||||
}) async {
|
||||
if (!hasNextPage) {
|
||||
if (pages.isNotEmpty && !hasNextPage) {
|
||||
return pages.expand((page) => page).toList();
|
||||
}
|
||||
final tracks = await getAllTracks();
|
||||
|
Loading…
Reference in New Issue
Block a user