mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Removed update when clicking on a game and fixed sorting
This commit is contained in:
parent
3cbbb71768
commit
28bd70e745
1 changed files with 3 additions and 3 deletions
|
@ -91,20 +91,20 @@ export class WindowManager {
|
||||||
where: {
|
where: {
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
executablePath: Not(IsNull()),
|
executablePath: Not(IsNull()),
|
||||||
|
lastTimePlayed: Not(IsNull()),
|
||||||
},
|
},
|
||||||
take: 5,
|
take: 5,
|
||||||
order: {
|
order: {
|
||||||
lastTimePlayed: "DESC",
|
updatedAt: "DESC",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const recentlyPlayedGames: Array<MenuItemConstructorOptions | MenuItem> =
|
const recentlyPlayedGames: Array<MenuItemConstructorOptions | MenuItem> =
|
||||||
games.map(({ title, id, executablePath }) => ({
|
games.map(({ title, executablePath }) => ({
|
||||||
label: title,
|
label: title,
|
||||||
type: "normal",
|
type: "normal",
|
||||||
click: async () => {
|
click: async () => {
|
||||||
if (!executablePath) return;
|
if (!executablePath) return;
|
||||||
await gameRepository.update({ id }, { executablePath });
|
|
||||||
|
|
||||||
shell.openPath(executablePath);
|
shell.openPath(executablePath);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue