fix: pin messages counter and load

This commit is contained in:
Richard Ramos 2021-07-01 14:29:50 -04:00 committed by Iuri Matias
parent 2e98724641
commit 516d1974b2
2 changed files with 4 additions and 1 deletions

View File

@ -411,6 +411,7 @@ QtObject:
proc setActiveChannel*(self: ChatsView, channel: string) {.slot.} =
self.channelView.setActiveChannel(channel)
self.messageView.activeChannelChanged()
# proc activeChannelChanged*(self: ChatsView) =
# self.channelView.activeChannelChanged()

View File

@ -260,6 +260,8 @@ QtObject:
self.upsertChannel(self.channelView.activeChannel.id)
return newQVariant(self.messageList[self.channelView.activeChannel.id])
proc activeChannelChanged*(self: MessageView) {.signal.}
QtProperty[QVariant] messageList:
read = getMessageList
notify = activeChannelChanged
@ -314,7 +316,7 @@ QtObject:
let pinnedMsgs = rpcResponseObj{"pinnedMessages"}
if(pinnedMsgs != nil and pinnedMsgs.kind != JNull):
let pinnedMessages = libstatus_chat.parseChatMessagesResponse(pinnedMsgs)
let pinnedMessages = libstatus_chat.parseChatPinnedMessagesResponse(pinnedMsgs)
self.status.chat.pinnedMessagesByChatID(chatId, pinnedMessages[0], pinnedMessages[1])
proc hideLoadingIndicator*(self: MessageView) {.slot.} =