refactor(shopinbit): remove ticket count from "My requests" button
What changed, and why it matters
This commit simply removes a small UI feature that showed the number of open support tickets on a 'My requests' button in the ShopInBit service area. The button still works and opens the requests page; it just no longer displays the count. There is no security relevance visible in the change.
No security action needed. This is a routine UI refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes StreamBuilder widgets that queried the local Drift database’s shopInBitTickets table count and updated the button label dynamically (e.g., ‘My requests (3)’). It replaces them with plain SecondaryButton widgets labeled ‘My requests’. It also removes an unused drift import. No logic affecting authentication, cryptography, network calls, permissions, data validation, or secrets is changed.
Changed components
lib/pages/more_view/services_view.dartlib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dartInspect captured patch +18 / −45
diff --git a/lib/pages/more_view/services_view.dart b/lib/pages/more_view/services_view.dart
index 403ac0b..f99bfa9 100644
--- a/lib/pages/more_view/services_view.dart
+++ b/lib/pages/more_view/services_view.dart
@@ -1,4 +1,3 @@
-import 'package:drift/drift.dart' show TableOrViewStatements;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -262,25 +261,13 @@ class _ServicesViewState extends ConsumerState<ServicesView> {
onPressed: _showShopDialog,
),
const SizedBox(height: 12),
- StreamBuilder(
- stream: ref
- .watch(pSharedDrift)
- .shopInBitTickets
- .count()
- .watchSingleOrNull(),
- builder: (context, snapshot) {
- final count = snapshot.data ?? 0;
- return SecondaryButton(
- label: count > 0
- ? "My requests ($count)"
- : "My requests",
- onPressed: () async {
- await Navigator.of(
- context,
- ).pushNamed(ShopInBitTicketsView.routeName);
- if (mounted) setState(() {});
- },
- );
+ SecondaryButton(
+ label: "My requests",
+ onPressed: () async {
+ await Navigator.of(
+ context,
+ ).pushNamed(ShopInBitTicketsView.routeName);
+ if (mounted) setState(() {});
},
),
],
diff --git a/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart b/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
index 2004289..aac7b12 100644
--- a/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
+++ b/lib/pages_desktop_specific/services/shopin_bit/desktop_shopinbit_view.dart
@@ -1,4 +1,3 @@
-import 'package:drift/drift.dart' show TableOrViewStatements;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -187,31 +186,18 @@ class _DesktopServicesViewState extends ConsumerState<DesktopShopInBitView> {
onPressed: _showShopDialog,
),
const SizedBox(width: 16),
- StreamBuilder(
- stream: ref
- .watch(pSharedDrift)
- .shopInBitTickets
- .count()
- .watchSingleOrNull(),
- builder: (context, snapshot) {
- final count = snapshot.data ?? 0;
-
- return SecondaryButton(
- width: 196,
- buttonHeight: ButtonHeight.m,
- label: count > 0
- ? "My requests ($count)"
- : "My requests",
- onPressed: () async {
- await showDialog<void>(
- context: context,
- builder: (_) => const NestedNavigatorDialog(
- initialRoute: ShopInBitTicketsView.routeName,
- ),
- );
- if (mounted) setState(() {});
- },
+ SecondaryButton(
+ width: 196,
+ buttonHeight: ButtonHeight.m,
+ label: "My requests",
+ onPressed: () async {
+ await showDialog<void>(
+ context: context,
+ builder: (_) => const NestedNavigatorDialog(
+ initialRoute: ShopInBitTicketsView.routeName,
+ ),
);
+ if (mounted) setState(() {});
},
),
const SizedBox(width: 16),
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.