diff --git a/lib/constants/app_info.dart b/lib/constants/app_info.dart index 253ef974..a56af88f 100644 --- a/lib/constants/app_info.dart +++ b/lib/constants/app_info.dart @@ -1,8 +1,8 @@ import 'package:flutter/foundation.dart'; class AppInfo { - static const String version = '4.5.0'; - static const String buildNumber = '127'; + static const String version = '4.5.1'; + static const String buildNumber = '128'; static const String fullVersion = '$version+$buildNumber'; static String get displayVersion => kDebugMode ? 'Internal' : version; diff --git a/lib/screens/queue_tab.dart b/lib/screens/queue_tab.dart index d26b17fa..9e15970d 100644 --- a/lib/screens/queue_tab.dart +++ b/lib/screens/queue_tab.dart @@ -2472,6 +2472,12 @@ class _QueueTabState extends ConsumerState { final hasQueueItems = ref.watch( downloadQueueLookupProvider.select((lookup) => lookup.itemIds.isNotEmpty), ); + final historyTotalCount = ref.watch( + downloadHistoryProvider.select((state) => state.totalCount), + ); + final localLibraryTotalCount = ref.watch( + localLibraryProvider.select((state) => state.totalCount), + ); final localLibraryEnabled = ref.watch( settingsProvider.select((s) => s.localLibraryEnabled), ); @@ -2565,6 +2571,13 @@ class _QueueTabState extends ConsumerState { (pageValues[historyFilterMode]?.isLoading ?? false); final hasAnyLibraryItems = queueCounts.allTrackCount > 0 || queueCounts.albumCount > 0; + final hasLibraryContent = + historyTotalCount > 0 || + (localLibraryEnabled && localLibraryTotalCount > 0); + final hasActiveSearch = + _searchQuery.isNotEmpty || _searchController.text.trim().isNotEmpty; + final shouldShowLibraryControls = + hasLibraryContent || hasAnyLibraryItems || hasActiveSearch; final bottomPadding = MediaQuery.paddingOf(context).bottom; final selectionItems = getFilterData( @@ -2644,7 +2657,7 @@ class _QueueTabState extends ConsumerState { ), ), - if (hasAnyLibraryItems || hasQueueItems) + if (shouldShowLibraryControls || hasQueueItems) SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.fromLTRB(16, 8, 16, 0), @@ -2709,7 +2722,7 @@ class _QueueTabState extends ConsumerState { if (hasQueueItems) _buildQueueItemsSliver(context, colorScheme), - if (hasAnyLibraryItems) + if (shouldShowLibraryControls) SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.fromLTRB(16, 12, 16, 4), @@ -3809,12 +3822,13 @@ class _QueueTabState extends ConsumerState { (filterMode != 'albums' || (filteredGroupedAlbums.isEmpty && filteredGroupedLocalAlbums.isEmpty)) && - !showFilteringIndicator) + !showFilteringIndicator && + !isPageLoading) SliverFillRemaining( hasScrollBody: false, child: _buildEmptyState(context, colorScheme, filterMode), ) - else if (isPageLoading && filterMode != 'albums') + else if (isPageLoading) SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), diff --git a/pubspec.yaml b/pubspec.yaml index 97c58757..d14fe516 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: spotiflac_android description: Download Spotify tracks in FLAC from Tidal, Qobuz & Deezer publish_to: "none" -version: 4.5.0+127 +version: 4.5.1+128 environment: sdk: ^3.10.0