Skip to content

Commit

Permalink
fix: save the new highlight version to the clientStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ng-d committed Nov 9, 2024
1 parent 1ff0cc9 commit b055949
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 1 addition & 17 deletions src/ui/modules/Highlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,7 @@ export default class Highlight extends React.Component<
? `${this.state.position + 1} of ${this.state.announcements.length}`
: undefined
}
onClose={(e) => {
parent.postMessage(
{
pluginMessage: {
type: 'SET_ITEMS',
items: [
{
key: 'highlight_version',
value: this.props.highlight.version,
},
],
},
},
'*'
)
this.props.onCloseHighlight(e)
}}
onClose={this.props.onCloseHighlight}
>
<div className="dialog__cover">
<img
Expand Down
18 changes: 17 additions & 1 deletion src/ui/modules/PriorityContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,23 @@ export default class PriorityContainer extends React.Component<
>
<Highlight
{...this.props}
onCloseHighlight={this.props.onClose}
onCloseHighlight={() => {
parent.postMessage(
{
pluginMessage: {
type: 'SET_ITEMS',
items: [
{
key: 'highlight_version',
value: this.props.highlight.version,
},
],
},
},
'*'
)
this.props.onClose()
}}
/>
</Feature>
)
Expand Down

0 comments on commit b055949

Please sign in to comment.