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(
|
style: defaultTextStyle.style.copyWith(
|
||||||
color: palette.bodyTextColor,
|
color: palette.bodyTextColor,
|
||||||
),
|
),
|
||||||
|
textAlign: mediaQuery.mdAndDown
|
||||||
|
? TextAlign.center
|
||||||
|
: TextAlign.start,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
@ -107,7 +107,7 @@ class TrackViewHeaderButtons extends HookConsumerWidget {
|
|||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
foregroundColor: Colors.black,
|
foregroundColor: Colors.black,
|
||||||
),
|
minimumSize: const Size(150, 40)),
|
||||||
label: Text(context.l10n.shuffle),
|
label: Text(context.l10n.shuffle),
|
||||||
icon: const Icon(SpotubeIcons.shuffle),
|
icon: const Icon(SpotubeIcons.shuffle),
|
||||||
onPressed: props.tracks.isEmpty ? null : onShuffle,
|
onPressed: props.tracks.isEmpty ? null : onShuffle,
|
||||||
@ -120,7 +120,7 @@ class TrackViewHeaderButtons extends HookConsumerWidget {
|
|||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: color.color,
|
backgroundColor: color.color,
|
||||||
foregroundColor: color.bodyTextColor,
|
foregroundColor: color.bodyTextColor,
|
||||||
),
|
minimumSize: const Size(150, 40)),
|
||||||
onPressed: isActive || props.tracks.isEmpty || isLoading.value
|
onPressed: isActive || props.tracks.isEmpty || isLoading.value
|
||||||
? null
|
? null
|
||||||
: onPlay,
|
: onPlay,
|
||||||
|
@ -5,7 +5,7 @@ extension FetchAllTracks on InfiniteQuery<List<Track>, dynamic, int> {
|
|||||||
Future<List<Track>> fetchAllTracks({
|
Future<List<Track>> fetchAllTracks({
|
||||||
required Future<List<Track>> Function() getAllTracks,
|
required Future<List<Track>> Function() getAllTracks,
|
||||||
}) async {
|
}) async {
|
||||||
if (!hasNextPage) {
|
if (pages.isNotEmpty && !hasNextPage) {
|
||||||
return pages.expand((page) => page).toList();
|
return pages.expand((page) => page).toList();
|
||||||
}
|
}
|
||||||
final tracks = await getAllTracks();
|
final tracks = await getAllTracks();
|
||||||
|
Loading…
Reference in New Issue
Block a user