Add websocket support

This commit is contained in:
iGoX committed 2026-10-16 19:12:16 +02:00
1 parent ce0579b672
commit 88f41081be
16 files changed
+1042 -168

No files matched your search

+1 -4
View File
@@ -36,9 +36,6 @@ class HomeScreen extends ConsumerWidget {
final snapshot = ref.watch(busylightSnapshotProvider);
final statusAsync = ref.watch(busylightStatusProvider);
// Start background polling (no-op if already running)
ref.watch(pollingProvider);
if (!snapshot.hasValue && !snapshot.hasError) {
return Scaffold(
backgroundColor: Colors.black,
@@ -65,7 +62,7 @@ class HomeScreen extends ConsumerWidget {
loading: () => const Center(child: CircularProgressIndicator(color: Colors.amber)),
error: (e, _) => _ErrorView(
message: e.toString(),
onRetry: () => ref.read(busylightStatusProvider.notifier).refresh(),
onRetry: () => ref.invalidate(busylightSnapshotProvider),
),
data: (_) => const _Body(),
),