fix(messaging): fix files not fully populating in provier details

If we don't wait until files is populated, the InputFile will mount with
files being empty and then when files gets updated, it won't set the
input.files.
This commit is contained in:
Steven Nguyen
2024-03-11 16:13:07 +01:00
parent 1cf5e51f64
commit b43c76c9bb
@@ -26,6 +26,7 @@
let updated = false;
let newMemberModal = false;
let message = '';
let ready = false;
const { displayName } = getProviderDisplayNameAndIcon(provider);
@@ -61,6 +62,7 @@
originalfiles[input.name] = dataTransfer.files;
}
}
ready = true;
});
async function update() {
@@ -229,7 +231,10 @@
provider settings.
</p>
<svelte:fragment slot="aside">
<SettingsFormList bind:files {inputs} bind:params={formValues} />
<!-- Must wait until ready or else the files input won't be set properly -->
{#if ready}
<SettingsFormList bind:files {inputs} bind:params={formValues} />
{/if}
</svelte:fragment>
<svelte:fragment slot="actions">