chore: allow updating specific importer

This commit is contained in:
Vjacheslav Trushkin 2024-05-14 16:33:31 +03:00
parent c5260541b8
commit e44822a40d
1 changed files with 4 additions and 1 deletions

View File

@ -125,7 +125,7 @@ export function updateIconSets(): number {
/** /**
* Trigger update * Trigger update
*/ */
export function triggerIconSetsUpdate(done?: (success?: boolean) => void) { export function triggerIconSetsUpdate(index?: number | null, done?: (success?: boolean) => void) {
if (!importers) { if (!importers) {
done?.(); done?.();
return; return;
@ -141,6 +141,9 @@ export function triggerIconSetsUpdate(done?: (success?: boolean) => void) {
// Check for updates // Check for updates
let updated = false; let updated = false;
for (let i = 0; i < importers?.length; i++) { for (let i = 0; i < importers?.length; i++) {
if (typeof index === 'number' && i !== index) {
continue;
}
updated = (await importers[i].checkForUpdate()) || updated; updated = (await importers[i].checkForUpdate()) || updated;
} }
return updated; return updated;