feat: add test notification

This commit is contained in:
Zamitto
2024-10-29 23:50:52 -03:00
parent 7d4d434164
commit a419b9ae38
5 changed files with 25 additions and 8 deletions

View File

@@ -13,8 +13,7 @@ import type { AchievementFile, UnlockedAchievement } from "@types";
import { achievementsLogger } from "../logger";
import { Cracker } from "@shared";
import { IsNull, Not } from "typeorm";
import { WindowManager } from "../window-manager";
import { publishNewAchievementBulkNotification } from "../notifications";
import { publishCombinedNewAchievementNotification } from "../notifications";
const fileStats: Map<string, number> = new Map();
const fltFiles: Map<string, Set<string>> = new Map();
@@ -250,10 +249,12 @@ export class AchievementWatcherManager {
0
);
publishNewAchievementBulkNotification(
totalNewAchievements,
totalNewGamesWithAchievements
);
if (totalNewAchievements > 0) {
publishCombinedNewAchievementNotification(
totalNewAchievements,
totalNewGamesWithAchievements
);
}
this.hasFinishedMergingWithRemote = true;
};

View File

@@ -9,7 +9,7 @@ import { getUnlockedAchievements } from "@main/events/user/get-unlocked-achievem
import { Game } from "@main/entity";
import { achievementsLogger } from "../logger";
import {
publishNewAchievementBulkNotification as publishCombinedNewAchievementNotification,
publishCombinedNewAchievementNotification,
publishNewAchievementNotification,
} from "../notifications";

View File

@@ -92,7 +92,7 @@ async function downloadImage(url: string) {
});
}
export const publishNewAchievementBulkNotification = async (
export const publishCombinedNewAchievementNotification = async (
achievementCount,
gameCount,
achievementIcon?: string