From e44822a40de0bd7c5ffe5579add761cc69135d33 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 14 May 2024 16:33:31 +0300 Subject: [PATCH] chore: allow updating specific importer --- src/data/icon-sets.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data/icon-sets.ts b/src/data/icon-sets.ts index 5669c98..d6d1ed0 100644 --- a/src/data/icon-sets.ts +++ b/src/data/icon-sets.ts @@ -125,7 +125,7 @@ export function updateIconSets(): number { /** * Trigger update */ -export function triggerIconSetsUpdate(done?: (success?: boolean) => void) { +export function triggerIconSetsUpdate(index?: number | null, done?: (success?: boolean) => void) { if (!importers) { done?.(); return; @@ -141,6 +141,9 @@ export function triggerIconSetsUpdate(done?: (success?: boolean) => void) { // Check for updates let updated = false; for (let i = 0; i < importers?.length; i++) { + if (typeof index === 'number' && i !== index) { + continue; + } updated = (await importers[i].checkForUpdate()) || updated; } return updated;