mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 20:40:18 +00:00
fix: group chat colors and adding nbsp; only when the message is from the current user
This commit is contained in:
parent
246b90b5ae
commit
9b35a01103
@ -100,6 +100,11 @@ QtObject:
|
||||
for chat in self.chats:
|
||||
if chat.id == chatId:
|
||||
return chat
|
||||
|
||||
proc getChannelByName*(self: ChannelsList, name: string): Chat =
|
||||
for chat in self.chats:
|
||||
if chat.name == name:
|
||||
return chat
|
||||
|
||||
proc upsertChannel(self: ChannelsList, channel: Chat): int =
|
||||
let idx = self.chats.findIndexById(channel.id)
|
||||
@ -114,7 +119,7 @@ QtObject:
|
||||
result = idx
|
||||
|
||||
proc getChannelColor*(self: ChannelsList, name: string): string =
|
||||
let channel = self.getChannelById(name)
|
||||
let channel = self.getChannelByName(name)
|
||||
if (channel == nil): return
|
||||
return channel.color
|
||||
|
||||
|
@ -29,7 +29,9 @@ proc renderBlock(self: ChatMessageList, message: Message): string =
|
||||
for pMsg in message.parsedText:
|
||||
case pMsg.textType:
|
||||
of "paragraph":
|
||||
result = result & "<p> "
|
||||
result = result & "<p>"
|
||||
if message.isCurrentUser:
|
||||
result = result & " "
|
||||
for children in pMsg.children:
|
||||
result = result & self.renderInline(children)
|
||||
result = result & "</p>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user