Skip to content

Commit

Permalink
Merge pull request #2129 from daostack/cw-2101-mobile-chat-messages-m…
Browse files Browse the repository at this point in the history
…issing
  • Loading branch information
roienatan authored Oct 18, 2023
2 parents 546e621 + 14b3118 commit 449066f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export default function ChatComponent({
}}
value={message}
onChange={setMessage}
placeholder="What do you think?"
placeholder="Message"
onKeyDown={onEnterKeyDown}
users={users}
shouldReinitializeEditor={shouldReinitializeEditor}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
LOADER_APPEARANCE_DELAY,
QueryParamKey,
} from "@/shared/constants";
import { useQueryParams } from "@/shared/hooks";
import { useForceUpdate, useQueryParams } from "@/shared/hooks";
import {
checkIsUserDiscussionMessage,
CommonFeedObjectUserUnique,
Expand Down Expand Up @@ -97,6 +97,13 @@ const ChatContent: ForwardRefRenderFunction<
const userId = user?.uid;
const queryParams = useQueryParams();
const messageIdParam = queryParams[QueryParamKey.Message];
const forceUpdate = useForceUpdate();

useEffect(() => {
if (messages) {
forceUpdate();
}
}, [messages]);

const [highlightedMessageId, setHighlightedMessageId] = useState(
() => (typeof messageIdParam === "string" && messageIdParam) || null,
Expand Down

0 comments on commit 449066f

Please sign in to comment.