parent
9d5c5c64cc
commit
146a6e8501
|
@ -68,6 +68,9 @@ method getModuleAsVariant*(self: Module): QVariant =
|
||||||
|
|
||||||
proc getChatSubItems(self: Module, chats: seq[ChatDto]): seq[location_menu_sub_item.SubItem] =
|
proc getChatSubItems(self: Module, chats: seq[ChatDto]): seq[location_menu_sub_item.SubItem] =
|
||||||
for chatDto in chats:
|
for chatDto in chats:
|
||||||
|
if chatDto.isHiddenChat:
|
||||||
|
continue
|
||||||
|
|
||||||
var chatName = chatDto.name
|
var chatName = chatDto.name
|
||||||
var chatImage = chatDto.icon
|
var chatImage = chatDto.icon
|
||||||
var colorHash: ColorHashDto = @[]
|
var colorHash: ColorHashDto = @[]
|
||||||
|
@ -168,6 +171,9 @@ proc getResultItemFromChats(self: Module, sectionId: string, chats: seq[ChatDto]
|
||||||
|
|
||||||
let searchTerm = self.controller.searchTerm().toLower
|
let searchTerm = self.controller.searchTerm().toLower
|
||||||
for chatDto in chats:
|
for chatDto in chats:
|
||||||
|
if chatDto.isHiddenChat:
|
||||||
|
continue
|
||||||
|
|
||||||
var chatName = chatDto.name
|
var chatName = chatDto.name
|
||||||
var chatImage = chatDto.icon
|
var chatImage = chatDto.icon
|
||||||
var colorHash: ColorHashDto = @[]
|
var colorHash: ColorHashDto = @[]
|
||||||
|
|
|
@ -350,3 +350,6 @@ proc isPrivateGroupChat*(c: ChatDto): bool =
|
||||||
|
|
||||||
proc isActivePersonalChat*(c: ChatDto): bool =
|
proc isActivePersonalChat*(c: ChatDto): bool =
|
||||||
return c.active and (c.isOneToOne() or c.isPrivateGroupChat()) and c.communityId == ""
|
return c.active and (c.isOneToOne() or c.isPrivateGroupChat()) and c.communityId == ""
|
||||||
|
|
||||||
|
proc isHiddenChat*(chatDto: ChatDto): bool =
|
||||||
|
return chatDto.hideIfPermissionsNotMet and not chatDto.canView
|
||||||
|
|
Loading…
Reference in New Issue