mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 21:01:02 +00:00
feat: add test notification
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ async function downloadImage(url: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export const publishNewAchievementBulkNotification = async (
|
||||
export const publishCombinedNewAchievementNotification = async (
|
||||
achievementCount,
|
||||
gameCount,
|
||||
achievementIcon?: string
|
||||
|
||||
Reference in New Issue
Block a user