From 64d5f298b48b5dc29eb9edd270ba6b9155107fde Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 22 Jul 2025 00:28:33 +0200 Subject: [PATCH] show total tab count when in tab sheet --- .../presentation/widgets/tabs_action_button.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tabs_action_button.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tabs_action_button.dart index 44e4dbd9..490acad2 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tabs_action_button.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tabs_action_button.dart @@ -3,6 +3,8 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:skeletonizer/skeletonizer.dart'; import 'package:weblibre/core/logger.dart'; +import 'package:weblibre/features/geckoview/features/tabs/data/entities/container_filter.dart'; +import 'package:weblibre/features/geckoview/features/tabs/domain/providers.dart'; import 'package:weblibre/features/geckoview/features/tabs/domain/providers/selected_container.dart'; class TabsActionButton extends HookConsumerWidget { @@ -15,7 +17,7 @@ class TabsActionButton extends HookConsumerWidget { this.onTap, this.onDoubleTap, this.onLongPress, - this.isActive = false, + required this.isActive, super.key, }); @@ -23,7 +25,11 @@ class TabsActionButton extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final theme = Theme.of(context); - final tabCount = ref.watch(selectedContainerTabCountProvider); + final tabCount = isActive + // ignore: provider_parameters + ? ref.watch(containerTabCountProvider(ContainerFilterDisabled())) + : ref.watch(selectedContainerTabCountProvider); + final lastTabCount = useRef(null); return InkWell(