This commit is contained in:
Gabe Kangas 2023-06-05 16:04:13 -07:00
parent 95c9239814
commit ed41990200
No known key found for this signature in database
GPG key ID: 4345B2060657F330
2 changed files with 2 additions and 15 deletions

View file

@ -2,7 +2,7 @@
import { Popover, Select } from 'antd';
import React, { FC, useCallback, useMemo, useRef, useState } from 'react';
import { useRecoilValue } from 'recoil';
import { Transforms, createEditor, BaseEditor, Text, Descendant, Editor } from 'slate';
import { Transforms, createEditor, BaseEditor, Text, Descendant, Editor, Range } from 'slate';
import {
Slate,
DefaultPlaceholder,
@ -186,7 +186,7 @@ export const ChatTextField: FC<ChatTextFieldProps> = ({
const editor = useMemo(() => withReact(withMentions(withImages(createEditor()))), []);
const inputRef = useRef<HTMLDivElement>(null);
const [search, setSearch] = useState('');
const [search, _setSearch] = useState('');
const chatUserNames = knownChatUserDisplayNames
?.filter(c => c.toLowerCase().startsWith(search.toLowerCase()))

View file

@ -17,11 +17,7 @@ import {
isOnlineSelector,
isMobileAtom,
serverStatusState,
<<<<<<< HEAD
isChatAvailableSelector,
=======
knownChatUserDisplayNamesAtom,
>>>>>>> 490f5dc79 (WIP chat user auto complete)
} from '../../stores/ClientConfigStore';
import { ClientConfig } from '../../../interfaces/client-config.model';
@ -102,11 +98,7 @@ export const Content: FC = () => {
const [isMobile, setIsMobile] = useRecoilState<boolean | undefined>(isMobileAtom);
const messages = useRecoilValue<ChatMessage[]>(chatMessagesAtom);
const online = useRecoilValue<boolean>(isOnlineSelector);
<<<<<<< HEAD
const isChatAvailable = useRecoilValue<boolean>(isChatAvailableSelector);
=======
const knownChatUserDisplayNames = useRecoilValue(knownChatUserDisplayNamesAtom);
>>>>>>> 490f5dc79 (WIP chat user auto complete)
const { viewerCount, lastConnectTime, lastDisconnectTime, streamTitle } =
useRecoilValue<ServerStatus>(serverStatusState);
@ -276,12 +268,7 @@ export const Content: FC = () => {
extraPageContent={extraPageContent}
setShowFollowModal={setShowFollowModal}
supportFediverseFeatures={supportFediverseFeatures}
<<<<<<< HEAD
online={online}
=======
chatEnabled={isChatAvailable}
knownChatUserDisplayNames={knownChatUserDisplayNames}
>>>>>>> 490f5dc79 (WIP chat user auto complete)
/>
) : (
<Col span={24} style={{ paddingRight: dynamicPadding }}>