From d19f15bb8472dc6218c696d77969692bd218c9b0 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 26 Aug 2020 14:10:47 -0400 Subject: [PATCH] fix: fix chat links in a couple of ways - link color in compact mode - channel links did not have a # - clicking on a mention should show that profile - The AddChat button image didn't reposition when closing --- src/app/chat/views/message_format.nim | 2 +- .../Chat/ChatColumn/MessageComponents/ChatText.qml | 6 +++--- ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml | 2 +- ui/nim-status-client.pro | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/chat/views/message_format.nim b/src/app/chat/views/message_format.nim index a3d12be0e1..4745960dca 100644 --- a/src/app/chat/views/message_format.nim +++ b/src/app/chat/views/message_format.nim @@ -22,7 +22,7 @@ proc renderInline(self: ChatMessageList, elem: TextItem): string = of "strong": result = fmt("{elem.literal} ") of "link": result = elem.destination of "mention": result = fmt("{self.mention(elem.literal)} ") - of "status-tag": result = fmt("{elem.literal} ") + of "status-tag": result = fmt("#{elem.literal} ") # See render-block in status-react/src/status_im/ui/screens/chat/message/message.cljs proc renderBlock(self: ChatMessageList, message: Message): string = diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml index c0ee663243..8e8e3c8fe2 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml @@ -20,9 +20,9 @@ StyledTextEdit { } if (link.startsWith('//')) { - let pk = link.replace("//", ""); - profileClick(chatsModel.userNameOrAlias(pk), pk, chatsModel.generateIdenticon(pk)) - return; + let pk = link.replace("//", ""); + profilePopup.openPopup(chatsModel.userNameOrAlias(pk), pk, chatsModel.generateIdenticon(pk)) + return; } Qt.openUrlExternally(link) diff --git a/ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml b/ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml index d548785b12..0d74480d14 100644 --- a/ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml +++ b/ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml @@ -40,7 +40,7 @@ AddButton { onTriggered: publicChatPopup.open() } onAboutToHide: { - btnAdd.icon.state = "default" + btnAdd.iconImg.state = "default" } } } diff --git a/ui/nim-status-client.pro b/ui/nim-status-client.pro index 0ca4ce6d6d..61a84062dc 100644 --- a/ui/nim-status-client.pro +++ b/ui/nim-status-client.pro @@ -141,6 +141,7 @@ DISTFILES += \ app/AppLayouts/Chat/ChatColumn/MessageComponents/UserImage.qml \ app/AppLayouts/Chat/ChatColumn/MessageComponents/UsernameLabel.qml \ app/AppLayouts/Chat/ChatColumn/MessageComponents/qmldir \ + app/AppLayouts/Chat/ContactsColumn/AddChat.qml \ app/AppLayouts/Chat/ContactsColumn/ClosedEmptyView.qml \ app/AppLayouts/Chat/components/EmojiCategoryButton.qml \ app/AppLayouts/Chat/components/EmojiPopup.qml \