From 165dc920dc8f489d85d7fac767f919dc52db859b Mon Sep 17 00:00:00 2001 From: Andrew Simachev Date: Mon, 19 May 2025 10:30:10 +0200 Subject: [PATCH] JS-7034: fix --- extension/popup/create.tsx | 4 +--- src/ts/component/block/chat/message/index.tsx | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/extension/popup/create.tsx b/extension/popup/create.tsx index 150cce886c..589eb60784 100644 --- a/extension/popup/create.tsx +++ b/extension/popup/create.tsx @@ -238,9 +238,7 @@ const Create = observer(class Create extends React.Component { - console.log('Collection', collection, object); - }); + U.Object.getById(collection, {}, object => this.setState({ collection: object })); }; initName () { diff --git a/src/ts/component/block/chat/message/index.tsx b/src/ts/component/block/chat/message/index.tsx index 9a705b67db..c6c37c0838 100644 --- a/src/ts/component/block/chat/message/index.tsx +++ b/src/ts/component/block/chat/message/index.tsx @@ -260,11 +260,19 @@ const ChatMessage = observer(class ChatMessage extends React.Component text, { subId }); - renderObjects(rootId, this.node, marks, () => text, { readonly }, { subId }); - renderLinks(rootId, this.node, marks, () => text, { readonly }, { subId }); - renderEmoji(this.node); + renderMentions(rootId, et, marks, () => text, { subId }); + renderObjects(rootId, et, marks, () => text, { readonly }, { subId }); + renderLinks(rootId, et, marks, () => text, { readonly }, { subId }); + renderEmoji(et); + + renderMentions(rootId, er, marks, () => text, { subId, iconSize: 16 }); + renderObjects(rootId, er, marks, () => text, { readonly }, { subId, iconSize: 16 }); + renderLinks(rootId, er, marks, () => text, { readonly }, { subId, iconSize: 16 }); + renderEmoji(er, { iconSize: 16 }); this.checkLinesLimit(); }; @@ -414,11 +422,10 @@ const ChatMessage = observer(class ChatMessage extends React.Component { - $(this.node).removeClass('highlight'); - }, J.Constant.delay.highlight); + node.addClass('highlight'); + window.setTimeout(() => node.removeClass('highlight'), J.Constant.delay.highlight); }; });