mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-02 05:57:59 +00:00
fix(properties): harden lifecycle and session fencing
- Fence Properties actions and Torrent moves by current caller sessions. - Preserve move progress and authoritative destinations across stale events and recovery. - Enforce immutable identity fields and transactional queued-edit rejection. - Restore subtle theme surfaces and expand regression coverage.
This commit is contained in:
@@ -121,6 +121,12 @@ const startDownloadListeners = async () => {
|
||||
return;
|
||||
}
|
||||
const status = payload.status as DownloadStatus;
|
||||
// A move terminal event carries its authoritative destination. Older
|
||||
// lifecycle events do not, so they must not overwrite an active move or
|
||||
// clear its progress while the native relocation still owns the row.
|
||||
if (current.status === 'moving' && status !== 'moving' && payload.destination == null) {
|
||||
return;
|
||||
}
|
||||
if (status !== 'moving') {
|
||||
useDownloadProgressStore.getState().clearMoveProgress(payload.id);
|
||||
}
|
||||
@@ -229,6 +235,9 @@ const startDownloadListeners = async () => {
|
||||
current.category
|
||||
);
|
||||
}
|
||||
if (payload.destination && payload.destination !== current.destination) {
|
||||
updates.destination = payload.destination;
|
||||
}
|
||||
if (status !== 'downloading' && status !== 'verifying') {
|
||||
updates.speed = '-';
|
||||
updates.eta = '-';
|
||||
|
||||
Reference in New Issue
Block a user