Skip to content

Commit

Permalink
feat: removing publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrannychaseroperation committed Dec 23, 2024
1 parent 3a1fa9a commit 4476b1b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/renderer/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
import { useTranslation } from "react-i18next";
import { UserFriendModal } from "./pages/shared-modals/user-friend-modal";
import { downloadSourcesWorker } from "./workers";
import { downloadSourcesTable } from "./dexie";

export interface AppProps {
children: React.ReactNode;
Expand Down Expand Up @@ -205,6 +206,18 @@ export function App() {
const newRepacksCount = event.data;
window.electron.publishNewRepacksNotification(newRepacksCount);
updateRepacks();

downloadSourcesTable.toArray().then((downloadSources) => {
downloadSources
.filter((source) => !source.fingerprint)
.forEach((downloadSource) => {
window.electron
.putDownloadSource(downloadSource.objectIds)
.then(({ fingerprint }) => {
downloadSourcesTable.update(downloadSource.id, { fingerprint });
});
});
});
};

downloadSourcesWorker.postMessage(["SYNC_DOWNLOAD_SOURCES", id]);
Expand Down

0 comments on commit 4476b1b

Please sign in to comment.