fix(update-center): cascade local and remote icon fallbacks

Keep update list icons from dropping straight to placeholders by retrying the remote store icon after local load failures. Align the update-center IPC and renderer types with the split local/remote icon contract.
This commit is contained in:
2026-04-11 11:41:01 +08:00
parent c16ba5536f
commit 180b88b5c0
11 changed files with 245 additions and 79 deletions
@@ -175,7 +175,8 @@ describe("update-center load items", () => {
nextVersion: "3.0.0",
arch: "amd64",
category: "tools",
icon: "https://erotica.spark-app.store/amd64-apm/tools/spark-weather/icon.png",
remoteIcon:
"https://erotica.spark-app.store/amd64-apm/tools/spark-weather/icon.png",
downloadUrl: "https://example.invalid/spark-weather_3.0.0_amd64.deb",
fileName: "spark-weather_3.0.0_amd64.deb",
size: 123456,
@@ -235,7 +236,8 @@ describe("update-center load items", () => {
nextVersion: "2.0.0",
arch: "amd64",
category: "office",
icon: "https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
remoteIcon:
"https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
},
]);
expect(result.warnings).toEqual([
@@ -308,7 +310,8 @@ describe("update-center load items", () => {
nextVersion: "2.0.0",
arch: "amd64",
category: "office",
icon: "https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
remoteIcon:
"https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
},
]);
});
@@ -362,7 +365,8 @@ describe("update-center load items", () => {
nextVersion: "2.0.0",
arch: "amd64",
category: "office",
icon: "https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
remoteIcon:
"https://erotica.spark-app.store/amd64-store/office/spark-notes/icon.png",
},
]);
expect(result.warnings).toEqual([