From cf07bc6554b0639840a80d683d090473f9948175 Mon Sep 17 00:00:00 2001 From: bponders12-cell Date: Tue, 1 Sep 2026 17:34:29 -0400 Subject: [PATCH] style: add flow-control braces to sync outbox --- lib/services/sync/sync_outbox.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/services/sync/sync_outbox.dart b/lib/services/sync/sync_outbox.dart index e02d077..9a708ef 100644 --- a/lib/services/sync/sync_outbox.dart +++ b/lib/services/sync/sync_outbox.dart @@ -41,7 +41,9 @@ class SyncOutbox { final operation = _saveChain.then((_) async { if (_items.length > maxOutboxCapacity) { final terminal = _items.values.where((i) => i.status.isTerminal).toList()..sort((a, b) => a.createdAt.compareTo(b.createdAt)); - while (_items.length > maxOutboxCapacity && terminal.isNotEmpty) _items.remove(terminal.removeAt(0).key); + while (_items.length > maxOutboxCapacity && terminal.isNotEmpty) { + _items.remove(terminal.removeAt(0).key); + } } if (_items.length > maxOutboxCapacity) throw StateError('Sync outbox capacity reached with no evictable terminal items.'); return _prefs.setString(_outboxStorageKey, jsonEncode(_items.values.map((e) => e.toJson()).toList()));