mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-09 00:37:31 +00:00
Compare commits
6 Commits
e40d314214
...
92a18bdac2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92a18bdac2 | ||
|
|
e575d23c4a | ||
|
|
42e954428b | ||
|
|
8c1337d1fc | ||
|
|
94e704087f | ||
|
|
8e287ab1e5 |
BIN
assets/fonts/Cookie-Regular.ttf
Normal file
BIN
assets/fonts/Cookie-Regular.ttf
Normal file
Binary file not shown.
@ -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: () {},
|
||||||
|
|||||||
@ -65,7 +65,16 @@ class Sidebar extends HookConsumerWidget {
|
|||||||
|
|
||||||
final navigationButtons = [
|
final navigationButtons = [
|
||||||
NavigationLabel(
|
NavigationLabel(
|
||||||
child: mediaQuery.lgAndUp ? const Text("Spotube") : const Text(""),
|
child: mediaQuery.lgAndUp
|
||||||
|
? const DefaultTextStyle(
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: "Cookie",
|
||||||
|
fontSize: 30,
|
||||||
|
letterSpacing: 1.8,
|
||||||
|
),
|
||||||
|
child: Text("Spotube"),
|
||||||
|
)
|
||||||
|
: const Text(""),
|
||||||
),
|
),
|
||||||
for (final tile in sidebarTileList)
|
for (final tile in sidebarTileList)
|
||||||
NavigationButton(
|
NavigationButton(
|
||||||
|
|||||||
@ -200,6 +200,11 @@ flutter:
|
|||||||
- family: BootstrapIcons
|
- family: BootstrapIcons
|
||||||
fonts:
|
fonts:
|
||||||
- asset: packages/shadcn_flutter/icons/BootstrapIcons.otf
|
- asset: packages/shadcn_flutter/icons/BootstrapIcons.otf
|
||||||
|
- family: Cookie
|
||||||
|
fonts:
|
||||||
|
- asset: assets/fonts/Cookie-Regular.ttf
|
||||||
|
style: normal
|
||||||
|
weight: 500
|
||||||
|
|
||||||
flutter_gen:
|
flutter_gen:
|
||||||
output: lib/collections
|
output: lib/collections
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user