mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #25249 from overleaf/dp-chat-message-read
Mark messages as read when opening chat tab GitOrigin-RevId: d0e3290cad72716cbbdf5b6cc92f6c1d387a92c7
This commit is contained in:
@@ -20,6 +20,8 @@ import { useIdeContext } from '@/shared/context/ide-context'
|
||||
import getMeta from '@/utils/meta'
|
||||
import { debugConsole } from '@/utils/debugging'
|
||||
import { User } from '../../../../../types/user'
|
||||
import { useRailContext } from '@/features/ide-redesign/contexts/rail-context'
|
||||
import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
|
||||
|
||||
const PAGE_SIZE = 50
|
||||
|
||||
@@ -200,7 +202,12 @@ export const ChatProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
const user = useUserContext()
|
||||
const { _id: projectId } = useProjectContext()
|
||||
|
||||
const { chatIsOpen } = useLayoutContext()
|
||||
const { chatIsOpen: chatIsOpenOldEditor } = useLayoutContext()
|
||||
const { selectedTab: selectedRailTab, isOpen: railIsOpen } = useRailContext()
|
||||
const newEditor = useIsNewEditorEnabled()
|
||||
const chatIsOpen = newEditor
|
||||
? selectedRailTab === 'chat' && railIsOpen
|
||||
: chatIsOpenOldEditor
|
||||
|
||||
const {
|
||||
hasFocus: windowHasFocus,
|
||||
|
||||
Reference in New Issue
Block a user