parent
54570bce6e
commit
0455bcdcf1
|
@ -322,7 +322,9 @@ QtObject:
|
|||
for chat in chats:
|
||||
if (chat.communityId != ""):
|
||||
self.communities.updateCommunityChat(chat)
|
||||
return
|
||||
if(self.channelView.activeChannel.id == chat.id):
|
||||
self.activeChannelChanged()
|
||||
continue
|
||||
self.messageView.upsertChannel(chat.id)
|
||||
self.channelView.chats.updateChat(chat)
|
||||
if(self.channelView.activeChannel.id == chat.id):
|
||||
|
|
|
@ -68,6 +68,8 @@ QtObject:
|
|||
proc setup(self: ChatMessageList) =
|
||||
self.QAbstractListModel.setup
|
||||
|
||||
proc countChanged*(self: ChatMessageList) {.signal.}
|
||||
|
||||
proc fetchMoreMessagesButton(self: ChatMessageList): Message =
|
||||
result = Message()
|
||||
result.contentType = ContentType.FetchMoreMessagesButton;
|
||||
|
@ -96,7 +98,6 @@ QtObject:
|
|||
result.status = status
|
||||
result.setup
|
||||
|
||||
|
||||
proc hasMessage*(self: ChatMessageList, messageId: string): bool =
|
||||
return self.messageIndex.hasKey(messageId)
|
||||
|
||||
|
@ -116,6 +117,7 @@ QtObject:
|
|||
for i in countup(0, self.messages.len - 1):
|
||||
self.messageIndex[self.messages[i].id] = i
|
||||
self.endRemoveRows()
|
||||
self.countChanged()
|
||||
|
||||
return true
|
||||
|
||||
|
@ -155,8 +157,6 @@ QtObject:
|
|||
method rowCount(self: ChatMessageList, index: QModelIndex = nil): int =
|
||||
return self.messages.len
|
||||
|
||||
proc countChanged*(self: ChatMessageList) {.signal.}
|
||||
|
||||
proc count*(self: ChatMessageList): int {.slot.} =
|
||||
self.messages.len
|
||||
|
||||
|
|
Loading…
Reference in New Issue