diff --git a/app/soapbox/features/chats/components/chat-message-list.tsx b/app/soapbox/features/chats/components/chat-message-list.tsx index 4e85468e9..17a7599b0 100644 --- a/app/soapbox/features/chats/components/chat-message-list.tsx +++ b/app/soapbox/features/chats/components/chat-message-list.tsx @@ -62,14 +62,12 @@ const timeChange = (prev: IChatMessage, curr: IChatMessage): TimeFormat | null = interface IChatMessageList { /** Chat the messages are being rendered from. */ chat: IChat, - /** Whether to make the chatbox fill the height of the screen. */ - autosize?: boolean, } const START_INDEX = 10000; /** Scrollable list of chat messages. */ -const ChatMessageList: React.FC = ({ chat, autosize }) => { +const ChatMessageList: React.FC = ({ chat }) => { const intl = useIntl(); const dispatch = useAppDispatch(); const account = useOwnAccount(); diff --git a/app/soapbox/features/chats/components/chat.tsx b/app/soapbox/features/chats/components/chat.tsx index 0499a5381..77ac48f47 100644 --- a/app/soapbox/features/chats/components/chat.tsx +++ b/app/soapbox/features/chats/components/chat.tsx @@ -17,7 +17,6 @@ import ChatMessageList from './chat-message-list'; interface ChatInterface { chat: IChat, - autosize?: boolean, inputRef?: MutableRefObject, className?: string, } @@ -26,7 +25,7 @@ interface ChatInterface { * Chat UI with just the messages and textarea. * Reused between floating desktop chats and fullscreen/mobile chats. */ -const Chat: React.FC = ({ chat, autosize, inputRef, className }) => { +const Chat: React.FC = ({ chat, inputRef, className }) => { const account = useOwnAccount(); const { createChatMessage, acceptChat } = useChatActions(chat.id); @@ -205,7 +204,7 @@ const Chat: React.FC = ({ chat, autosize, inputRef, className }) return (
- +
{ const queryInfo = useInfiniteQuery(ChatKeys.chatMessages(chat.id), ({ pageParam }) => getChatMessages(chat.id, pageParam), { enabled: !isBlocked, + cacheTime: 0, + staleTime: 0, getNextPageParam: (config) => { if (config.hasMore) { return { link: config.link };