diff --git a/src/status/chat.nim b/src/status/chat.nim index 2ee95951e2..9410916ea4 100644 --- a/src/status/chat.nim +++ b/src/status/chat.nim @@ -223,6 +223,14 @@ proc init*(self: ChatModel, pubKey: string) = self.mailserverReady = true self.requestMissingCommunityInfos() + if (topics.len == 0): + warn "No topics found for chats. Cannot load past messages" + else: + self.events.once("mailserverAvailable") do(a: Args): + self.mailserverReady = true + self.requestMissingCommunityInfos() + self.events.emit("mailserverTopics", TopicArgs(topics: topics)); + self.events.on("contactUpdate") do(a: Args): var evArgs = ContactUpdateArgs(a) self.updateContacts(evArgs.contacts) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml index d375d50a2b..d2a79185ef 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml @@ -61,6 +61,22 @@ Item { return Utils.removeStatusEns(alias) } + property string displayUserName: { + if (isCurrentUser) { + //% "You" + return qsTrId("You") + } + + if (localName !== "") { + return localName + } + + if (userName !== "") { + return Utils.removeStatusEns(userName) + } + return Utils.removeStatusEns(alias) + } + property string authorCurrentMsg: "authorCurrentMsg" property string authorPrevMsg: "authorPrevMsg"