Skip to content

Commit

Permalink
Fix error when ignoring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Oct 22, 2024
1 parent acd137e commit 7365ef5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import { getModalStore } from '$lib/skeletonExtensions';
import { canModify, unignoredUpdates, updateCheckInProgress, updates } from '$lib/store/ficsitCLIStore';
import { error } from '$lib/store/generalStore';
import { ignoredUpdates, offline } from '$lib/store/settingsStore';
import { offline } from '$lib/store/settingsStore';
import { OfflineGetModsByReferences, UpdateMods } from '$wailsjs/go/ficsitcli/ficsitCLI';
import type { ficsitcli } from '$wailsjs/go/models';
import { SetUpdateIgnore, SetUpdateUnignore } from '$wailsjs/go/settings/settings';
Expand Down Expand Up @@ -103,10 +103,9 @@
function toggleIgnoreUpdate(update: ficsitcli.Update) {
if($unignoredUpdates.includes(update)) {
SetUpdateIgnore(update.item, update.newVersion);
$ignoredUpdates[update.item] = [...($ignoredUpdates[update.item] ?? []), update.newVersion];
$selectedUpdates = $selectedUpdates.filter((u) => u !== update);
} else {
SetUpdateUnignore(update.item, update.newVersion);
$ignoredUpdates[update.item] = $ignoredUpdates[update.item].filter((v) => v !== update.newVersion);
}
}
Expand Down

0 comments on commit 7365ef5

Please sign in to comment.