fix: code review

This commit is contained in:
Richard Ramos 2020-06-12 11:08:30 -04:00 committed by Iuri Matias
parent 78e8e6be93
commit e38f1b0268
3 changed files with 2 additions and 4 deletions

View File

@ -28,8 +28,6 @@ QtObject:
self.members = members
self.endResetModel()
proc len*(self: ChatMembersView): int {.slot.} = self.members.len
method rowCount(self: ChatMembersView, index: QModelIndex = nil): int = self.members.len
method data(self: ChatMembersView, index: QModelIndex, role: int): QVariant =

View File

@ -49,7 +49,7 @@ Rectangle {
case Constants.chatTypePublic: return qsTr("Public chat")
case Constants.chatTypeOneToOne: return qsTr("TODO: Contact/Not a contact")
case Constants.chatTypePrivateGroupChat:
let cnt = chatsModel.activeChannel.members.len();
let cnt = chatsModel.activeChannel.members.rowCount();
if(cnt > 1) return qsTr("%1 members").arg(cnt);
return qsTr("1 member");
}

View File

@ -47,7 +47,7 @@ ModalPopup {
Text {
text: {
let cnt = chatsModel.activeChannel.members.len();
let cnt = chatsModel.activeChannel.members.rowCount();
if(cnt > 1) return qsTr("%1 members").arg(cnt);
return qsTr("1 member");
}