feat: add easy to use get function for chat channels
This commit is contained in:
parent
e2bf81a281
commit
26d7cacaea
|
@ -35,6 +35,11 @@ QtObject:
|
|||
self.names.add(chatId)
|
||||
self.endInsertRows()
|
||||
|
||||
proc get*(self: ChatsView, index: int): string {.slot.} =
|
||||
if index < 0 or index >= self.names.len:
|
||||
return
|
||||
return self.names[index]
|
||||
|
||||
method rowCount(self: ChatsView, index: QModelIndex = nil): int =
|
||||
return self.names.len
|
||||
|
||||
|
|
Loading…
Reference in New Issue