mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 09:13:57 +00:00
fix: persisting is remote
This commit is contained in:
@@ -15,10 +15,15 @@ const syncDownloadSources = async (_event: Electron.IpcMainInvokeEvent) => {
|
||||
);
|
||||
|
||||
for (const downloadSource of response) {
|
||||
await downloadSourcesSublevel.put(downloadSource.id, downloadSource);
|
||||
}
|
||||
const existingDownloadSource = downloadSources.find(
|
||||
(source) => source.id === downloadSource.id
|
||||
);
|
||||
|
||||
return response;
|
||||
await downloadSourcesSublevel.put(downloadSource.id, {
|
||||
...existingDownloadSource,
|
||||
...downloadSource,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
registerEvent("syncDownloadSources", syncDownloadSources);
|
||||
|
||||
Reference in New Issue
Block a user