fix: Fixed community channel emoji not updated (#10534)

This commit is contained in:
Igor Sirotin 2023-05-03 20:07:37 +03:00 committed by GitHub
parent 2401bb52bb
commit f656088112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -520,7 +520,7 @@ QtObject:
)
# Handle name/description changes
if chat.name != prev_chat.name or chat.description != prev_chat.description or chat.color != prev_chat.color:
if chat.name != prev_chat.name or chat.description != prev_chat.description or chat.color != prev_chat.color or chat.emoji != prev_chat.emoji:
var updatedChat = findChatById(chat.id, updatedChats)
updatedChat.updateMissingFields(chat)
self.chatService.updateOrAddChat(updatedChat) # we have to update chats stored in the chat service.
@ -665,8 +665,11 @@ QtObject:
return toSeq(self.getFilteredCuratedCommunities.values)
proc getCommunityById*(self: Service, communityId: string): CommunityDto =
if(not self.communities.hasKey(communityId)):
error "error: requested community doesn't exists", communityId
if communityId == "":
return
if not self.communities.hasKey(communityId):
error "requested community doesn't exists", communityId
return
return self.communities[communityId]

View File

@ -15,9 +15,12 @@ Loader {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 6
StatusBaseText {
anchors.verticalCenter: parent.verticalCenter
text: qsTr("Loading chats...")
}
LoadingAnimation {}
LoadingAnimation {
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}