fix small bug where removing mod source didnt fully refresh list (#548)

This commit is contained in:
Matt Dallmeyer 2024-08-31 16:05:40 -04:00 committed by GitHub
parent 42718a5492
commit c735e340c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,10 +28,14 @@
let pageLoaded = false;
onMount(async () => {
async function refreshModSourceData() {
currentSources = await getModSources();
await refreshModSources();
currentSourceData = await getModSourcesData();
}
onMount(async () => {
await refreshModSourceData();
pageLoaded = true;
});
</script>
@ -61,7 +65,7 @@
disabled={newSourceURL === ""}
on:click={async () => {
await addModSource(newSourceURL, currentSourceData);
currentSources = await getModSources();
await refreshModSourceData();
}}
><IconPlus
class="text-xl"
@ -86,7 +90,7 @@
class="p-0 m-3 hover:text-red-500"
on:click={async () => {
await removeModSource(i);
currentSources = await getModSources();
await refreshModSourceData();
}}
><IconDeleteForever
class="text-xl"