feat: moving notifications

This commit is contained in:
Chubby Granny Chaser
2024-06-05 14:18:40 +01:00
parent d6e57c20c7
commit ef036d6f57
17 changed files with 179 additions and 87 deletions

View File

@@ -18,7 +18,11 @@ const addDownloadSource = async (
async (transactionalEntityManager) => {
const downloadSource = await transactionalEntityManager
.getRepository(DownloadSource)
.save({ url, name: source.name });
.save({
url,
name: source.name,
downloadCount: source.downloads.length,
});
await insertDownloadsFromSource(
transactionalEntityManager,

View File

@@ -0,0 +1,7 @@
import { registerEvent } from "../register-event";
import { fetchDownloadSourcesAndUpdate } from "@main/helpers";
const syncDownloadSources = async (_event: Electron.IpcMainInvokeEvent) =>
fetchDownloadSourcesAndUpdate();
registerEvent("syncDownloadSources", syncDownloadSources);

View File

@@ -34,6 +34,7 @@ import "./download-sources/get-download-sources";
import "./download-sources/validate-download-source";
import "./download-sources/add-download-source";
import "./download-sources/remove-download-source";
import "./download-sources/sync-download-sources";
ipcMain.handle("ping", () => "pong");
ipcMain.handle("getVersion", () => app.getVersion());