fix(settings): harden audited state synchronization

This commit is contained in:
NimBold
2026-07-21 05:05:34 +03:30
parent 621652ae13
commit 69ce2b15ba
9 changed files with 304 additions and 37 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import {
resolveCategoryDestination
} from '../utils/downloadLocations';
import { canPauseDownload, canStartDownload } from '../utils/downloadActions';
import { updateDockBadge } from '../utils/dockBadge';
import i18n from '../i18n';
export type { DownloadCategory } from '../utils/downloads';
@@ -487,7 +488,7 @@ export const getSiteLogin = (url: string, settings: ReturnType<typeof useSetting
const syncSystemIntegrations = () => {
const settings = useSettingsStore.getState();
const activeCount = useDownloadStore.getState().downloads.filter(d => isTransferActiveStatus(d.status)).length;
invoke('update_dock_badge', { count: settings.showDockBadge ? activeCount : 0 }).catch(() => {});
updateDockBadge(settings.showDockBadge ? activeCount : 0).catch(() => {});
};
const effectiveDestinationForItem = async (