Skip to content

Commit

Permalink
Fix background errors when only attacks are fetched.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Feb 10, 2025
1 parent c3661a6 commit 394fecb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
{ "message": "Fix custom sounds not working anymore.", "contributor": "DeKleineKobini" },
{ "message": "Migrate the database when the background loads as well, if needed.", "contributor": "DeKleineKobini" },
{ "message": "Solve the performance issue with FF Scouter gauges.", "contributor": "DeKleineKobini" },
{ "message": "Fix the faction id feature not running when it should.", "contributor": "DeKleineKobini" }
{ "message": "Fix the faction id feature not running when it should.", "contributor": "DeKleineKobini" },
{ "message": "Fix background errors when only attacks are fetched.", "contributor": "DeKleineKobini" }
],
"changes": [
{ "message": "Keep a consistent order within the sidebar information section.", "contributor": "DeKleineKobini" },
Expand Down
12 changes: 7 additions & 5 deletions extension/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,16 +374,18 @@ async function updateUserdata(forceUpdate = false) {
await ttStorage.set({ userdata: { ...oldUserdata, ...userdata } });

await showIconBars().catch((error) => console.error("Error while updating the icon bars.", error));
await notifyEventMessages().catch((error) => console.error("Error while sending event and message notifications.", error));
if (updateEssential) {
await notifyEventMessages().catch((error) => console.error("Error while sending event and message notifications.", error));
await notifyTravelLanding().catch((error) => console.error("Error while sending travel landing notifications.", error));
await notifyBars().catch((error) => console.error("Error while sending bar notification.", error));
await notifyChain().catch((error) => console.error("Error while sending chain notifications.", error));
await notifyTraveling().catch((error) => console.error("Error while sending traveling notifications.", error));
}
await notifyStatusChange().catch((error) => console.error("Error while sending status change notifications.", error));
await notifyCooldownOver().catch((error) => console.error("Error while sending cooldown notifications.", error));
await notifyTravelLanding().catch((error) => console.error("Error while sending travel landing notifications.", error));
await notifyEducation().catch((error) => console.error("Error while sending education notifications.", error));
await notifyNewDay().catch((error) => console.error("Error while sending new day notification.", error));
await notifyBars().catch((error) => console.error("Error while sending bar notification.", error));
await notifyChain().catch((error) => console.error("Error while sending chain notifications.", error));
await notifyHospital().catch((error) => console.error("Error while sending hospital notifications.", error));
await notifyTraveling().catch((error) => console.error("Error while sending traveling notifications.", error));
await notifySpecificCooldowns().catch((error) => console.error("Error while sending specific cooldown notifications.", error));

await ttStorage.set({ notifications });
Expand Down

0 comments on commit 394fecb

Please sign in to comment.