fix(ui): align download list and live properties

This commit is contained in:
NimBold
2026-06-19 07:42:59 +03:30
parent 8a1619f056
commit 28df7ca809
3 changed files with 49 additions and 42 deletions
+7 -2
View File
@@ -34,8 +34,13 @@ export async function initDownloadListener() {
const mainStore = useDownloadStore.getState();
const current = mainStore.downloads.find(d => d.id === payload.id);
if (current && payload.size && current.size !== payload.size) {
mainStore.updateDownload(payload.id, { size: payload.size });
if (current) {
mainStore.updateDownload(payload.id, {
fraction: payload.fraction,
speed: payload.speed,
eta: payload.eta,
...(payload.size ? { size: payload.size } : {}),
});
}
});