mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 02:59:28 +00:00
fix: run dart fix
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions
This commit is contained in:
parent
2cb00c451e
commit
ad0cd6e2ad
5 changed files with 49 additions and 41 deletions
|
|
@ -26,7 +26,7 @@ Future<Library?> library(Ref ref, String id) async {
|
||||||
_logger.warning('No library found in the list of libraries');
|
_logger.warning('No library found in the list of libraries');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
_logger.fine('Fetched library: ${library}');
|
_logger.fine('Fetched library: $library');
|
||||||
return library.library;
|
return library.library;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ part of 'library_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$libraryHash() => r'b62d976f8ab83b2f5823a0fb7dac52fde8fcbffc';
|
String _$libraryHash() => r'f8a34100acb58f02fa958c71a629577bf815710e';
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
/// Copied from Dart SDK
|
||||||
class _SystemHash {
|
class _SystemHash {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ class LibraryItemPage extends HookConsumerWidget {
|
||||||
final showFab = useState(false);
|
final showFab = useState(false);
|
||||||
|
|
||||||
// Effect to listen to scroll changes and update FAB visibility
|
// Effect to listen to scroll changes and update FAB visibility
|
||||||
useEffect(() {
|
useEffect(
|
||||||
|
() {
|
||||||
void listener() {
|
void listener() {
|
||||||
if (!scrollController.hasClients) {
|
if (!scrollController.hasClients) {
|
||||||
return; // Ensure controller is attached
|
return; // Ensure controller is attached
|
||||||
|
|
@ -55,7 +56,9 @@ class LibraryItemPage extends HookConsumerWidget {
|
||||||
|
|
||||||
// Cleanup: remove the listener when the widget is disposed
|
// Cleanup: remove the listener when the widget is disposed
|
||||||
return () => scrollController.removeListener(listener);
|
return () => scrollController.removeListener(listener);
|
||||||
}, [scrollController],); // Re-run effect if scrollController changes
|
},
|
||||||
|
[scrollController],
|
||||||
|
); // Re-run effect if scrollController changes
|
||||||
|
|
||||||
// --- FAB Scroll-to-Top Logic ---
|
// --- FAB Scroll-to-Top Logic ---
|
||||||
void scrollToTop() {
|
void scrollToTop() {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
||||||
|
|
||||||
final showTitle = useState(false);
|
final showTitle = useState(false);
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(
|
||||||
|
() {
|
||||||
void listener() {
|
void listener() {
|
||||||
final shouldShow = scrollController.hasClients &&
|
final shouldShow = scrollController.hasClients &&
|
||||||
scrollController.offset > _showTitleThreshold;
|
scrollController.offset > _showTitleThreshold;
|
||||||
|
|
@ -39,7 +40,9 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return () => scrollController.removeListener(listener);
|
return () => scrollController.removeListener(listener);
|
||||||
}, [scrollController],);
|
},
|
||||||
|
[scrollController],
|
||||||
|
);
|
||||||
|
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
|
@ -62,7 +65,8 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
||||||
key: const ValueKey('title-text'),
|
key: const ValueKey('title-text'),
|
||||||
item?.media.metadata.title ?? '',
|
item?.media.metadata.title ?? '',
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,)
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
)
|
||||||
: const SizedBox(
|
: const SizedBox(
|
||||||
// Also give it a key for differentiation
|
// Also give it a key for differentiation
|
||||||
key: ValueKey('empty-title'),
|
key: ValueKey('empty-title'),
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,8 @@ class _LibrarySelectionContent extends ConsumerWidget {
|
||||||
trailing: isSelected ? const Icon(Icons.check) : null,
|
trailing: isSelected ? const Icon(Icons.check) : null,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
appLogger.info(
|
appLogger.info(
|
||||||
'Selected library: ${library.name} (ID: ${library.id})');
|
'Selected library: ${library.name} (ID: ${library.id})',
|
||||||
|
);
|
||||||
// Get current settings state
|
// Get current settings state
|
||||||
final currentSettings = ref.read(apiSettingsProvider);
|
final currentSettings = ref.read(apiSettingsProvider);
|
||||||
// Update the active library ID
|
// Update the active library ID
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue