mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -80,7 +80,7 @@ const getUnlockedAchievementsEvent = async (
|
||||
objectId: string,
|
||||
shop: GameShop
|
||||
): Promise<UserAchievement[]> => {
|
||||
AchievementWatcherManager.firstSyncWithRemoteIfNeeded(shop, objectId);
|
||||
await AchievementWatcherManager.firstSyncWithRemoteIfNeeded(shop, objectId);
|
||||
return getUnlockedAchievements(objectId, shop, false);
|
||||
};
|
||||
|
||||
|
||||
@@ -167,6 +167,8 @@ export class AchievementWatcherManager {
|
||||
const gameKey = levelKeys.game(shop, objectId);
|
||||
if (this.alreadySyncedGames.get(gameKey)) return;
|
||||
|
||||
this.alreadySyncedGames.set(gameKey, true);
|
||||
|
||||
const game = await gamesSublevel.get(gameKey).catch(() => null);
|
||||
if (!game || game.isDeleted) return;
|
||||
|
||||
@@ -190,8 +192,6 @@ export class AchievementWatcherManager {
|
||||
}
|
||||
}
|
||||
|
||||
this.alreadySyncedGames.set(gameKey, true);
|
||||
|
||||
const newAchievements = await mergeAchievements(
|
||||
game,
|
||||
unlockedAchievements,
|
||||
|
||||
@@ -36,7 +36,11 @@ export function GameItem({ game }: GameItemProps) {
|
||||
(steamGenre) => steamGenre === genre
|
||||
);
|
||||
|
||||
if (index && steamGenres[language] && steamGenres[language][index]) {
|
||||
if (
|
||||
index !== undefined &&
|
||||
steamGenres[language] &&
|
||||
steamGenres[language][index]
|
||||
) {
|
||||
return steamGenres[language][index];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user