diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/editor-navigation-toolbar-root.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/editor-navigation-toolbar-root.js index 622f9dbb18..82f0c91569 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/editor-navigation-toolbar-root.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/editor-navigation-toolbar-root.js @@ -26,7 +26,7 @@ const layoutContextPropTypes = { } const chatContextPropTypes = { - resetUnreadMessageCount: PropTypes.func.isRequired, + markMessagesAsRead: PropTypes.func.isRequired, unreadMessageCount: PropTypes.number.isRequired, } @@ -55,16 +55,16 @@ function EditorNavigationToolbarRoot({ pdfLayout, } = useLayoutContext(layoutContextPropTypes) - const { resetUnreadMessageCount, unreadMessageCount } = useChatContext( + const { markMessagesAsRead, unreadMessageCount } = useChatContext( chatContextPropTypes ) const toggleChatOpen = useCallback(() => { if (!chatIsOpen) { - resetUnreadMessageCount() + markMessagesAsRead() } setChatIsOpen(value => !value) - }, [chatIsOpen, setChatIsOpen, resetUnreadMessageCount]) + }, [chatIsOpen, setChatIsOpen, markMessagesAsRead]) const toggleReviewPanelOpen = useCallback( () => setReviewPanelOpen(value => !value),