mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-02-03 23:52:52 +00:00
Compare commits
6 Commits
84ee89957f
...
e6abddfbb9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6abddfbb9 | ||
|
|
759bf36387 | ||
|
|
42e954428b | ||
|
|
8c1337d1fc | ||
|
|
94e704087f | ||
|
|
8e287ab1e5 |
16
.github/workflows/spotube-release-binary.yml
vendored
16
.github/workflows/spotube-release-binary.yml
vendored
@ -78,14 +78,14 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
git-source: https://github.com/flutter/flutter.git
|
git-source: https://github.com/flutter/flutter.git
|
||||||
|
|
||||||
- name: free disk space
|
# - name: free disk space
|
||||||
if: ${{ matrix.platform == 'android' }}
|
# if: ${{ matrix.platform == 'android' }}
|
||||||
run: |
|
# run: |
|
||||||
sudo swapoff -a
|
# sudo swapoff -a
|
||||||
sudo rm -f /swapfile
|
# sudo rm -f /swapfile
|
||||||
sudo apt clean
|
# sudo apt clean
|
||||||
docker rmi $(docker image ls -aq)
|
# docker rmi $(docker image ls -aq)
|
||||||
df -h
|
# df -h
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
if: ${{matrix.platform == 'android'}}
|
if: ${{matrix.platform == 'android'}}
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
|
|||||||
@ -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: () {},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user