Skip to content

Commit 43484ae

Browse files
make sure to upload images added to the description properly
1 parent f487f06 commit 43484ae

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/dashboard-refactor/logic.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import MarkdownIt from 'markdown-it'
8080
import { copyToClipboard } from 'src/annotations/content_script/utils'
8181
import Raven from 'raven-js'
8282
import analytics from 'src/analytics'
83+
import { processCommentForImageUpload } from '@worldbrain/memex-common/lib/annotations/processCommentForImageUpload'
8384

8485
type EventHandler<EventName extends keyof Events> = UIEventHandler<
8586
State,
@@ -4798,13 +4799,23 @@ export class DashboardLogic extends UILogic<State, Events> {
47984799
source: 'updateSelectedListDescription',
47994800
})
48004801

4802+
let processedDescription = (
4803+
await processCommentForImageUpload(
4804+
event.description,
4805+
null,
4806+
null,
4807+
this.options.imageSupportBG,
4808+
false,
4809+
)
4810+
).toString()
4811+
48014812
this.options.annotationsCache.updateList({
48024813
unifiedId: selectedListId,
4803-
description: event.description,
4814+
description: processedDescription,
48044815
})
48054816

48064817
await this.options.listsBG.updateListDescription({
4807-
description: event.description,
4818+
description: processedDescription,
48084819
listId: listData.localId!,
48094820
})
48104821
}

0 commit comments

Comments
 (0)