Disable row and height animations when removing downloads

This commit is contained in:
Sucukdeluxe
2026-09-04 22:13:06 +02:00
parent 3436fcdd24
commit 36611647ab
9 changed files with 49 additions and 6 deletions
+10 -1
View File
@@ -38,7 +38,8 @@ import {
getDownloadOrderTransitionPinnedIds,
getDownloadOrderTransformKeyframes,
isDownloadPackageOrderChange,
shouldAnimateDownloadOrderChange
shouldAnimateDownloadOrderChange,
hasRemovedDownloadItems
} from "../src/renderer/views/downloads/download-order-transition";
import {
DownloadsContent,
@@ -386,6 +387,14 @@ describe("virtualisierte Paketanimation", () => {
expect(shouldAnimateDownloadOrderChange({ animationsEnabled: false, sortRevision: 3, appliedSortRevision: 3 })).toBe(false);
});
it("detects removed queue entries even when another entry is added in the same update", () => {
expect(hasRemovedDownloadItems({ first: {}, second: {} }, { second: {} })).toBe(true);
expect(hasRemovedDownloadItems({ first: {}, second: {} }, { second: {}, third: {} })).toBe(true);
expect(hasRemovedDownloadItems({ first: {} }, {})).toBe(true);
expect(hasRemovedDownloadItems({ first: {} }, { first: { status: "completed" }, second: {} })).toBe(false);
expect(hasRemovedDownloadItems(undefined, { first: {} })).toBe(false);
});
it("pins only previously visible rows for a real priority reorder", () => {
expect(DOWNLOAD_ORDER_TRANSITION_DURATION_MS).toBe(3000);
expect(isDownloadPackageOrderChange(["a", "b", "c"], ["b", "c", "a"])).toBe(true);