Skip to content

Commit

Permalink
TSK-1430: fix svelte-check & rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
  • Loading branch information
ThetaDR committed May 19, 2023
1 parent ab6c496 commit daaff79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/popups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function updatePopup (id: string, props: Partial<CompAndProps>): void {
popupstore.update((popups) => {
const popupIndex = popups.findIndex((p) => p.id === id)
if (popupIndex !== -1) {
popups[popupIndex] = { ...popups[popupIndex], props }
popups[popupIndex] = { ...popups[popupIndex], ...props }
}
return popups
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
const sel = listProvider.docs()[selected] as Attachment
if (sel !== undefined && attachmentPopupId !== '') {
listProvider.updateFocus(sel)
updatePopup(attachmentPopupId, { file: sel.file, name: sel.name, contentType: sel.type })
updatePopup(attachmentPopupId, { props: { file: sel.file, name: sel.name, contentType: sel.type } })
}
})
$: listProvider.update(Array.from(attachments.values()).filter((attachment) => attachment.type.startsWith('image/')))
Expand Down Expand Up @@ -365,11 +365,7 @@
{#each Array.from(attachments.values()) as attachment, index}
<div class="item flex-center flex-no-shrink clear-mins">
{#if useAttachmentPreview}
<AttachmentPreview
value={attachment}
{listProvider}
on:open={(res) => (attachmentPopupId = res.detail)}
/>
<AttachmentPreview value={attachment} {listProvider} on:open={(res) => (attachmentPopupId = res.detail)} />
{:else}
<AttachmentPresenter
value={attachment}
Expand Down

0 comments on commit daaff79

Please sign in to comment.