Skip to content

Commit

Permalink
make sure to upload images added to the description properly
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Mar 3, 2024
1 parent f487f06 commit 43484ae
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/dashboard-refactor/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import MarkdownIt from 'markdown-it'
import { copyToClipboard } from 'src/annotations/content_script/utils'
import Raven from 'raven-js'
import analytics from 'src/analytics'
import { processCommentForImageUpload } from '@worldbrain/memex-common/lib/annotations/processCommentForImageUpload'

type EventHandler<EventName extends keyof Events> = UIEventHandler<
State,
Expand Down Expand Up @@ -4798,13 +4799,23 @@ export class DashboardLogic extends UILogic<State, Events> {
source: 'updateSelectedListDescription',
})

let processedDescription = (
await processCommentForImageUpload(
event.description,
null,
null,
this.options.imageSupportBG,
false,
)
).toString()

this.options.annotationsCache.updateList({
unifiedId: selectedListId,
description: event.description,
description: processedDescription,
})

await this.options.listsBG.updateListDescription({
description: event.description,
description: processedDescription,
listId: listData.localId!,
})
}
Expand Down

0 comments on commit 43484ae

Please sign in to comment.