fix appstate repeated instantiation

This commit is contained in:
stopflock
2025-08-10 00:53:01 -05:00
parent 6bf9556c65
commit 641344271f
7 changed files with 55 additions and 45 deletions
@@ -19,7 +19,7 @@ class QueueSection extends StatelessWidget {
? const Text('Sandbox mode uploads go to OSM Sandbox')
: const Text('Tap to view queue'),
onTap: appState.pendingCount > 0
? () => _showQueueDialog(context, appState)
? () => _showQueueDialog(context)
: null,
),
if (appState.pendingCount > 0)
@@ -57,7 +57,8 @@ class QueueSection extends StatelessWidget {
);
}
void _showQueueDialog(BuildContext context, AppState appState) {
void _showQueueDialog(BuildContext context) {
final appState = context.read<AppState>();
showDialog(
context: context,
builder: (context) => AlertDialog(