fix(chat_section_module): Don't force update icon and name for 1-1 chats
This commit is contained in:
parent
4fc52dddcb
commit
eb9f94630a
|
@ -344,7 +344,7 @@ method onNotificationsUpdated*(self: Module, hasUnreadMessages: bool, notificati
|
|||
self.view.updateChatDetailsNotifications(hasUnreadMessages, notificationCount)
|
||||
|
||||
method onChatEdited*(self: Module, chatDto: ChatDto) =
|
||||
self.view.updateChatDetails(chatDto.name, chatDto.description, chatDto.emoji, chatDto.color, chatDto.icon, chatDto.chatType == ChatType.OneToOne)
|
||||
self.view.updateChatDetails(chatDto)
|
||||
self.messagesModule.updateChatFetchMoreMessages()
|
||||
self.messagesModule.updateChatIdentifier()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import NimQml
|
||||
import ../../../shared_models/message_model as pinned_msg_model
|
||||
import ../../../../../app_service/service/contacts/dto/contacts as contacts_dto
|
||||
import ../../../../../app_service/service/chat/dto/chat as chat_dto
|
||||
|
||||
import io_interface
|
||||
import chat_details
|
||||
|
@ -128,13 +128,13 @@ QtObject:
|
|||
proc amIChatAdmin*(self: View): bool {.slot.} =
|
||||
return self.delegate.amIChatAdmin()
|
||||
|
||||
proc updateChatDetails*(self: View, name, description, emoji, color, icon: string, ignoreName: bool) =
|
||||
if not ignoreName:
|
||||
self.chatDetails.setName(name)
|
||||
self.chatDetails.setDescription(description)
|
||||
self.chatDetails.setEmoji(emoji)
|
||||
self.chatDetails.setColor(color)
|
||||
self.chatDetails.setIcon(icon)
|
||||
proc updateChatDetails*(self: View, chatDto: ChatDto) =
|
||||
if chatDto.chatType != ChatType.OneToOne:
|
||||
self.chatDetails.setName(chatDto.name)
|
||||
self.chatDetails.setIcon(chatDto.icon)
|
||||
self.chatDetails.setDescription(chatDto.description)
|
||||
self.chatDetails.setEmoji(chatDto.emoji)
|
||||
self.chatDetails.setColor(chatDto.color)
|
||||
|
||||
proc updateChatDetailsName*(self: View, name: string) =
|
||||
self.chatDetails.setName(name)
|
||||
|
|
Loading…
Reference in New Issue