fix: fix community rebase errors

This commit is contained in:
Jonathan Rainville 2021-03-01 14:00:51 -05:00 committed by Iuri Matias
parent c5241e2bf4
commit e28e98a394
3 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,6 @@ QtObject:
self.transactions.delete self.transactions.delete
self.messageList = initOrderedTable[string, ChatMessageList]() self.messageList = initOrderedTable[string, ChatMessageList]()
self.communities.delete self.communities.delete
self.messageList = initTable[string, ChatMessageList]()
self.channelOpenTime = initTable[string, int64]() self.channelOpenTime = initTable[string, int64]()
self.QAbstractListModel.delete self.QAbstractListModel.delete
@ -228,7 +227,8 @@ QtObject:
proc setActiveChannelByIndexWithForce*(self: ChatsView, index: int, forceUpdate: bool) {.slot.} = proc setActiveChannelByIndexWithForce*(self: ChatsView, index: int, forceUpdate: bool) {.slot.} =
if((self.communities.activeCommunity.active and self.communities.activeCommunity.chats.chats.len == 0) or (not self.communities.activeCommunity.active and self.chats.chats.len == 0)): return if((self.communities.activeCommunity.active and self.communities.activeCommunity.chats.chats.len == 0) or (not self.communities.activeCommunity.active and self.chats.chats.len == 0)): return
let selectedChannel =
var selectedChannel =
if (self.communities.activeCommunity.active): if (self.communities.activeCommunity.active):
self.communities.activeCommunity.chats.getChannel(index) self.communities.activeCommunity.chats.getChannel(index)
else: else:
@ -723,6 +723,6 @@ QtObject:
proc getMessageListIndex(self: ChatsView):int {.slot.} = proc getMessageListIndex(self: ChatsView):int {.slot.} =
var idx = -1 var idx = -1
for msg in toSeq(self.messageList.values): for msg in toSeq(self.messageList.values):
if(self.activeChannel.id == msg.id): return idx
idx = idx + 1 idx = idx + 1
if(self.activeChannel.id == msg.id): return idx
return idx return idx

View File

@ -258,7 +258,7 @@ ScrollView {
DelegateModelGeneralized { DelegateModelGeneralized {
id: messageListDelegate id: messageListDelegate
property var lessThan: [ lessThan: [
function(left, right) { return left.clock > right.clock } function(left, right) { return left.clock > right.clock }
] ]

View File

@ -57,7 +57,7 @@ Item {
y: optionsBtn.height y: optionsBtn.height
Action { Action {
enabled: chatsModel.activeCommunity.admin enabled: chatsModel.communities.activeCommunity.admin
//% "Create channel" //% "Create channel"
text: qsTrId("create-channel") text: qsTrId("create-channel")
icon.source: "../../img/hash.svg" icon.source: "../../img/hash.svg"