Skip to content

Commit 394fecb

Browse files
Fix background errors when only attacks are fetched.
1 parent c3661a6 commit 394fecb

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

extension/changelog.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
{ "message": "Fix custom sounds not working anymore.", "contributor": "DeKleineKobini" },
99
{ "message": "Migrate the database when the background loads as well, if needed.", "contributor": "DeKleineKobini" },
1010
{ "message": "Solve the performance issue with FF Scouter gauges.", "contributor": "DeKleineKobini" },
11-
{ "message": "Fix the faction id feature not running when it should.", "contributor": "DeKleineKobini" }
11+
{ "message": "Fix the faction id feature not running when it should.", "contributor": "DeKleineKobini" },
12+
{ "message": "Fix background errors when only attacks are fetched.", "contributor": "DeKleineKobini" }
1213
],
1314
"changes": [
1415
{ "message": "Keep a consistent order within the sidebar information section.", "contributor": "DeKleineKobini" },

extension/scripts/background.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,18 @@ async function updateUserdata(forceUpdate = false) {
374374
await ttStorage.set({ userdata: { ...oldUserdata, ...userdata } });
375375

376376
await showIconBars().catch((error) => console.error("Error while updating the icon bars.", error));
377-
await notifyEventMessages().catch((error) => console.error("Error while sending event and message notifications.", error));
377+
if (updateEssential) {
378+
await notifyEventMessages().catch((error) => console.error("Error while sending event and message notifications.", error));
379+
await notifyTravelLanding().catch((error) => console.error("Error while sending travel landing notifications.", error));
380+
await notifyBars().catch((error) => console.error("Error while sending bar notification.", error));
381+
await notifyChain().catch((error) => console.error("Error while sending chain notifications.", error));
382+
await notifyTraveling().catch((error) => console.error("Error while sending traveling notifications.", error));
383+
}
378384
await notifyStatusChange().catch((error) => console.error("Error while sending status change notifications.", error));
379385
await notifyCooldownOver().catch((error) => console.error("Error while sending cooldown notifications.", error));
380-
await notifyTravelLanding().catch((error) => console.error("Error while sending travel landing notifications.", error));
381386
await notifyEducation().catch((error) => console.error("Error while sending education notifications.", error));
382387
await notifyNewDay().catch((error) => console.error("Error while sending new day notification.", error));
383-
await notifyBars().catch((error) => console.error("Error while sending bar notification.", error));
384-
await notifyChain().catch((error) => console.error("Error while sending chain notifications.", error));
385388
await notifyHospital().catch((error) => console.error("Error while sending hospital notifications.", error));
386-
await notifyTraveling().catch((error) => console.error("Error while sending traveling notifications.", error));
387389
await notifySpecificCooldowns().catch((error) => console.error("Error while sending specific cooldown notifications.", error));
388390

389391
await ttStorage.set({ notifications });

0 commit comments

Comments
 (0)