fix: stabilize library search and bump version

This commit is contained in:
zarzet
2026-05-07 02:14:24 +07:00
parent 8238e2fe68
commit 18467c54d6
3 changed files with 21 additions and 7 deletions
+2 -2
View File
@@ -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;
+18 -4
View File
@@ -2472,6 +2472,12 @@ class _QueueTabState extends ConsumerState<QueueTab> {
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<QueueTab> {
(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<QueueTab> {
),
),
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<QueueTab> {
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<QueueTab> {
(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),
+1 -1
View File
@@ -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