diff --git a/lib/screens/main_shell.dart b/lib/screens/main_shell.dart index b8165193..2f490685 100644 --- a/lib/screens/main_shell.dart +++ b/lib/screens/main_shell.dart @@ -819,10 +819,7 @@ class _MainShellState extends ConsumerState navigatorKey: _libraryTabNavigatorKey, observers: [_libraryPreviewStopObserver], heroAnimationsEnabled: heroAnimationsEnabled, - child: _LibraryTabRoot( - parentPageController: _pageController, - isTabActive: _currentIndex == 1, - ), + child: _LibraryTabRoot(isTabActive: _currentIndex == 1), ), if (showStore) _TabNavigator( @@ -1224,25 +1221,13 @@ class _PreviewStopNavigatorObserver extends NavigatorObserver { } class _LibraryTabRoot extends ConsumerWidget { - final PageController parentPageController; final bool isTabActive; - const _LibraryTabRoot({ - required this.parentPageController, - required this.isTabActive, - }); + const _LibraryTabRoot({required this.isTabActive}); @override Widget build(BuildContext context, WidgetRef ref) { - final showStore = ref.watch( - settingsProvider.select((s) => s.showExtensionStore), - ); - return QueueTab( - isTabActive: isTabActive, - parentPageController: parentPageController, - parentPageIndex: 1, - nextPageIndex: showStore ? 2 : 3, - ); + return QueueTab(isTabActive: isTabActive); } } diff --git a/lib/screens/queue_tab.dart b/lib/screens/queue_tab.dart index fd165529..0a7d573d 100644 --- a/lib/screens/queue_tab.dart +++ b/lib/screens/queue_tab.dart @@ -239,18 +239,8 @@ DownloadHistoryItem? _historyItemForCompletionBridge( class QueueTab extends ConsumerStatefulWidget { final String? librarySection; final bool isTabActive; - final PageController? parentPageController; - final int parentPageIndex; - final int? nextPageIndex; - const QueueTab({ - super.key, - this.librarySection, - this.isTabActive = true, - this.parentPageController, - this.parentPageIndex = 1, - this.nextPageIndex, - }); + const QueueTab({super.key, this.librarySection, this.isTabActive = true}); @override ConsumerState createState() => _QueueTabState(); diff --git a/lib/widgets/library_fast_scroller.dart b/lib/widgets/library_fast_scroller.dart index c964f2a4..206995fa 100644 --- a/lib/widgets/library_fast_scroller.dart +++ b/lib/widgets/library_fast_scroller.dart @@ -19,8 +19,6 @@ class LibraryFastScroller extends StatefulWidget { super.key, required this.child, required this.labelAt, - this.onDragStart, - this.onDragEnd, this.topPadding = 0, this.bottomPadding = 0, }); @@ -32,9 +30,6 @@ class LibraryFastScroller extends StatefulWidget { /// Label for the row at [fraction] of the scrollable content, or null. final String? Function(double fraction) labelAt; - final VoidCallback? onDragStart; - final VoidCallback? onDragEnd; - /// Height of the pinned header. While an outer scroll view is expanded, /// only its overlap with this viewport is reserved. final double topPadding; @@ -86,10 +81,6 @@ class _LibraryFastScrollerState extends State { _hideTimer?.cancel(); _position?.removeListener(_onPositionChanged); _outerPosition?.removeListener(_onOuterPositionChanged); - if (_dragging) { - final onDragEnd = widget.onDragEnd; - WidgetsBinding.instance.addPostFrameCallback((_) => onDragEnd?.call()); - } super.dispose(); } @@ -155,7 +146,6 @@ class _LibraryFastScrollerState extends State { _dragging = true; _show(); }); - widget.onDragStart?.call(); } void _updateDrag(DragUpdateDetails details, double trackHeight) { @@ -197,7 +187,6 @@ class _LibraryFastScrollerState extends State { _dragging = false; _show(); }); - widget.onDragEnd?.call(); } @override