Skip to content

Commit

Permalink
chore: allow updating specific importer
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberalien committed May 14, 2024
1 parent c526054 commit e44822a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data/icon-sets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e44822a

Please sign in to comment.