mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-18 01:35:17 +00:00
Compare commits
6 Commits
6063eaa430
...
30514f9e52
Author | SHA1 | Date | |
---|---|---|---|
![]() |
30514f9e52 | ||
![]() |
dddaa5a964 | ||
![]() |
42e954428b | ||
![]() |
8c1337d1fc | ||
![]() |
94e704087f | ||
![]() |
8e287ab1e5 |
@ -9,7 +9,7 @@ import 'package:spotube/provider/history/recent.dart';
|
||||
|
||||
class HomeRecentlyPlayedSection extends HookConsumerWidget {
|
||||
const HomeRecentlyPlayedSection({super.key});
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, ref) {
|
||||
final history = ref.watch(recentlyPlayedItems);
|
||||
@ -20,17 +20,20 @@ class HomeRecentlyPlayedSection extends HookConsumerWidget {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
final uniqueItems = <dynamic>{};
|
||||
final filteredItems = [
|
||||
for (final item in historyData)
|
||||
if (item.playlist != null && item.playlist?.id != null && uniqueItems.add(item.playlist!.id!))
|
||||
item.playlist
|
||||
else if (item.album != null && item.album?.id != null && uniqueItems.add(item.album?.id))
|
||||
item.album
|
||||
];
|
||||
|
||||
return Skeletonizer(
|
||||
enabled: history.isLoading,
|
||||
child: HorizontalPlaybuttonCardView(
|
||||
title: Text(context.l10n.recently_played),
|
||||
items: [
|
||||
for (final item in historyData)
|
||||
if (item.playlist != null)
|
||||
item.playlist
|
||||
else if (item.album != null)
|
||||
item.album
|
||||
],
|
||||
items: filteredItems,
|
||||
hasNextPage: false,
|
||||
isLoadingNextPage: false,
|
||||
onFetchMore: () {},
|
||||
|
@ -963,7 +963,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
resolved-ref: "2a549b08a91349a6ca334981e956dc2c9519b04c"
|
||||
resolved-ref: "916bde44cbead75125e8db842eb46bdcf211a79a"
|
||||
url: "https://github.com/KRTirtho/flutter_new_pipe_extractor.git"
|
||||
source: git
|
||||
version: "0.1.0"
|
||||
|
Loading…
Reference in New Issue
Block a user