mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 16:53:57 +00:00
feat: grayscale and update game details context on achievement event
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { gameAchievementRepository, gameRepository } from "@main/repository";
|
||||
import { publishNewAchievementNotification } from "../notifications";
|
||||
import type { GameShop, UnlockedAchievement } from "@types";
|
||||
import { WindowManager } from "../window-manager";
|
||||
|
||||
export const mergeAchievements = async (
|
||||
objectId: string,
|
||||
@@ -28,6 +29,14 @@ export const mergeAchievements = async (
|
||||
});
|
||||
});
|
||||
|
||||
if (!newAchievements.length) return;
|
||||
|
||||
WindowManager.mainWindow?.webContents.send(
|
||||
"on-achievement-unlocked",
|
||||
objectId,
|
||||
shop
|
||||
);
|
||||
|
||||
for (const achievement of newAchievements) {
|
||||
const completeAchievement = JSON.parse(
|
||||
localGameAchievement?.achievements || "[]"
|
||||
|
||||
Reference in New Issue
Block a user