mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: dispatching event when remote games are fetched
This commit is contained in:
parent
ca81281f1f
commit
944f3891bf
8 changed files with 31 additions and 17 deletions
|
@ -81,6 +81,9 @@ export function App() {
|
|||
window.electron.onSignIn(() => {
|
||||
updateUser();
|
||||
}),
|
||||
window.electron.onLibraryBatchComplete(() => {
|
||||
updateLibrary();
|
||||
}),
|
||||
window.electron.onSignOut(() => {
|
||||
clearUser();
|
||||
}),
|
||||
|
@ -89,7 +92,7 @@ export function App() {
|
|||
return () => {
|
||||
listeners.forEach((unsubscribe) => unsubscribe());
|
||||
};
|
||||
}, [updateUser, clearUser]);
|
||||
}, [updateUser, updateLibrary, clearUser]);
|
||||
|
||||
const handleSearch = useCallback(
|
||||
(query: string) => {
|
||||
|
|
3
src/renderer/src/declaration.d.ts
vendored
3
src/renderer/src/declaration.d.ts
vendored
|
@ -73,6 +73,7 @@ declare global {
|
|||
getGameByObjectID: (objectID: string) => Promise<Game | null>;
|
||||
onPlaytime: (cb: (gameId: number) => void) => () => Electron.IpcRenderer;
|
||||
onGameClose: (cb: (gameId: number) => void) => () => Electron.IpcRenderer;
|
||||
onLibraryBatchComplete: (cb: () => void) => () => Electron.IpcRenderer;
|
||||
|
||||
/* User preferences */
|
||||
getUserPreferences: () => Promise<UserPreferences | null>;
|
||||
|
@ -111,7 +112,7 @@ declare global {
|
|||
checkForUpdates: () => Promise<boolean>;
|
||||
restartAndInstallUpdate: () => Promise<void>;
|
||||
|
||||
/* Authg */
|
||||
/* Auth */
|
||||
signOut: () => Promise<void>;
|
||||
onSignIn: (cb: () => void) => () => Electron.IpcRenderer;
|
||||
onSignOut: (cb: () => void) => () => Electron.IpcRenderer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue