mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-02-03 23:52:52 +00:00
Compare commits
6 Commits
cd881a2e7b
...
84ee89957f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84ee89957f | ||
|
|
8bce0fa17d | ||
|
|
42e954428b | ||
|
|
8c1337d1fc | ||
|
|
94e704087f | ||
|
|
8e287ab1e5 |
@ -9,7 +9,7 @@ import 'package:spotube/provider/history/recent.dart';
|
|||||||
|
|
||||||
class HomeRecentlyPlayedSection extends HookConsumerWidget {
|
class HomeRecentlyPlayedSection extends HookConsumerWidget {
|
||||||
const HomeRecentlyPlayedSection({super.key});
|
const HomeRecentlyPlayedSection({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, ref) {
|
Widget build(BuildContext context, ref) {
|
||||||
final history = ref.watch(recentlyPlayedItems);
|
final history = ref.watch(recentlyPlayedItems);
|
||||||
@ -20,17 +20,20 @@ class HomeRecentlyPlayedSection extends HookConsumerWidget {
|
|||||||
return const SizedBox();
|
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(
|
return Skeletonizer(
|
||||||
enabled: history.isLoading,
|
enabled: history.isLoading,
|
||||||
child: HorizontalPlaybuttonCardView(
|
child: HorizontalPlaybuttonCardView(
|
||||||
title: Text(context.l10n.recently_played),
|
title: Text(context.l10n.recently_played),
|
||||||
items: [
|
items: filteredItems,
|
||||||
for (final item in historyData)
|
|
||||||
if (item.playlist != null)
|
|
||||||
item.playlist
|
|
||||||
else if (item.album != null)
|
|
||||||
item.album
|
|
||||||
],
|
|
||||||
hasNextPage: false,
|
hasNextPage: false,
|
||||||
isLoadingNextPage: false,
|
isLoadingNextPage: false,
|
||||||
onFetchMore: () {},
|
onFetchMore: () {},
|
||||||
|
|||||||
@ -114,7 +114,7 @@ dependencies:
|
|||||||
wikipedia_api: ^0.1.0
|
wikipedia_api: ^0.1.0
|
||||||
win32_registry: ^1.1.5
|
win32_registry: ^1.1.5
|
||||||
window_manager: ^0.4.3
|
window_manager: ^0.4.3
|
||||||
youtube_explode_dart: ^3.0.0
|
youtube_explode_dart: ^3.0.5
|
||||||
yt_dlp_dart:
|
yt_dlp_dart:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/KRTirtho/yt_dlp_dart.git
|
url: https://github.com/KRTirtho/yt_dlp_dart.git
|
||||||
@ -122,6 +122,7 @@ dependencies:
|
|||||||
flutter_new_pipe_extractor:
|
flutter_new_pipe_extractor:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/KRTirtho/flutter_new_pipe_extractor.git
|
url: https://github.com/KRTirtho/flutter_new_pipe_extractor.git
|
||||||
|
ref: ab3ff415114b7b43593e6ee718ad3d760af18350
|
||||||
http_parser: ^4.1.2
|
http_parser: ^4.1.2
|
||||||
collection: any
|
collection: any
|
||||||
archive: ^4.0.7
|
archive: ^4.0.7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user