Skip to content

Commit 03fbbfd

Browse files
committed
chore: ignore cooldown field in comparing ships with server
1 parent 3db0473 commit 03fbbfd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cli/lib/caches.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ class TopOfLoopUpdater {
216216
current: await ShipSnapshot.load(db)
217217
..updateForServerTime(DateTime.timestamp()),
218218
server: await fetchShips(db, api),
219-
toJsonList: (e) => e.ships.map((e) => e.toJson()).toList(),
219+
// Ignore the cooldown field, since even with updateForServerTime, it's
220+
// hard to exactly match the server.
221+
toJsonList: (e) =>
222+
e.ships.map((e) => e.toJson()..['cooldown'] = null).toList(),
220223
);
221224
// caches.agent should be deleted.
222225
await caches.agent.updateAgent(

0 commit comments

Comments
 (0)