File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,27 +158,12 @@ class ShopInBitOrdersService extends ChangeNotifier {
158158 Future <void > refreshAll () async {
159159 try {
160160 final customerKey = await shopInBitService.ensureCustomerKey ();
161- final db = SharedDrift .get ();
162-
163- // Backfill rows for tickets that exist on the API but not locally
164- // (created on another device, web dashboard, etc.). A failure here
165- // shouldn't stop the refresh of tickets we already know about.
166- try {
167- final newCompanions = await shopInBitService.fetchAllForCustomerKey (
168- customerKey,
169- );
170- for (final companion in newCompanions) {
171- await db.into (db.shopInBitTickets).insertOnConflictUpdate (companion);
172- }
173- } catch (_) {
174- // Fall through to the refresh-existing path.
175- }
176-
177161 final resp = await shopInBitService.client.getTicketsByCustomer (
178162 customerKey,
179163 );
180164 if (resp.hasError || resp.value == null ) return ;
181165
166+ final db = SharedDrift .get ();
182167 final localRows = await db.select (db.shopInBitTickets).get ();
183168 final byApiId = {for (final r in localRows) r.apiTicketId: r};
184169
You can’t perform that action at this time.
0 commit comments