mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-02 17:54:01 +00:00
fix(chat_section): make chat hidden if category collapsed when creating
Fixes #10381
This commit is contained in:
parent
464110a2db
commit
863c4f5d7a
@ -184,9 +184,9 @@ proc init*(self: Controller) =
|
||||
self.events.on(SIGNAL_COMMUNITY_CHANNEL_CREATED) do(e:Args):
|
||||
let args = CommunityChatArgs(e)
|
||||
let belongsToCommunity = args.chat.communityId.len > 0
|
||||
discard self.delegate.addOrUpdateChat(args.chat, belongsToCommunity, self.events, self.settingsService, self.nodeConfigurationService,
|
||||
self.contactService, self.chatService, self.communityService, self.messageService, self.gifService,
|
||||
self.mailserversService, setChatAsActive = true)
|
||||
discard self.delegate.addOrUpdateChat(args.chat, belongsToCommunity, self.events, self.settingsService,
|
||||
self.nodeConfigurationService, self.contactService, self.chatService, self.communityService,
|
||||
self.messageService, self.gifService, self.mailserversService, setChatAsActive = true)
|
||||
|
||||
self.events.on(SIGNAL_COMMUNITY_CHANNEL_DELETED) do(e:Args):
|
||||
let args = CommunityChatIdArgs(e)
|
||||
|
@ -589,7 +589,10 @@ method addNewChat*(
|
||||
if chatDto.chatType != ChatType.PrivateGroupChat:
|
||||
amIChatAdmin = amIChatAdmin or channelGroup.admin
|
||||
|
||||
var categoryOpened = true
|
||||
if chatDto.categoryId != "":
|
||||
let categoryItem = self.view.chatsModel.getItemById(chatDto.categoryId)
|
||||
categoryOpened = categoryItem.categoryOpened
|
||||
if channelGroup.id != "":
|
||||
for category in channelGroup.categories:
|
||||
if category.id == chatDto.categoryId:
|
||||
@ -623,8 +626,9 @@ method addNewChat*(
|
||||
colorId,
|
||||
colorHash,
|
||||
chatDto.highlight,
|
||||
categoryOpened,
|
||||
onlineStatus = onlineStatus,
|
||||
loaderActive = setChatAsActive
|
||||
loaderActive = setChatAsActive,
|
||||
)
|
||||
self.addSubmodule(
|
||||
chatDto.id,
|
||||
|
@ -1061,8 +1061,7 @@ QtObject:
|
||||
color: string,
|
||||
categoryId: string) =
|
||||
try:
|
||||
let response = status_go.createCommunityChannel(communityId, name, description, emoji, color,
|
||||
categoryId)
|
||||
let response = status_go.createCommunityChannel(communityId, name, description, emoji, color, categoryId)
|
||||
|
||||
if not response.error.isNil:
|
||||
let error = Json.decode($response.error, RpcError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user