diff --git a/src/components/common/profile/ChatExtra.tsx b/src/components/common/profile/ChatExtra.tsx index 71f7a9d11..b9283bdac 100644 --- a/src/components/common/profile/ChatExtra.tsx +++ b/src/components/common/profile/ChatExtra.tsx @@ -165,11 +165,18 @@ const ChatExtra = ({ const noteTextRef = useRef(); + const shouldRenderNote = Boolean(note); + const { isCollapsed: isNoteCollapsed, isCollapsible: isNoteCollapsible, setIsCollapsed: setIsNoteCollapsed, - } = useCollapsibleLines(noteTextRef, MAX_LINES, undefined); + } = useCollapsibleLines( + noteTextRef, + MAX_LINES, + undefined, + !shouldRenderNote, + ); useEffectWithPrevDeps(([prevPeerId]) => { if (!peerId || prevPeerId === peerId) return; @@ -481,7 +488,7 @@ const ChatExtra = ({ {oldLang('BusinessProfileLocation')} )} - {note && ( + {shouldRenderNote && (