fix(import): fix import community popup (#15568)

Fixes #15526

Fixes the import popup showing the wrong state. That was because a param was removed from the function, but not from the call to that function, so `true` was passed in `invitationPending` when it shouldn't have.

I also added a call to `spectateCommunity` before the community intro popup so that the community spectated beforee sending the request
This commit is contained in:
Jonathan Rainville 2024-07-15 13:27:28 -04:00 committed by GitHub
parent 2cad2a0885
commit 54924420e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -702,7 +702,6 @@ proc getChatItemFromChatDto(
var viewersCanPostReactions = true
var missingEncryptionKey = false
if self.controller.isCommunity:
let communityChat = community.getCommunityChat(chatDto.id)
# NOTE: workaround for new community chat, which is delivered in chatDto before the community will know about that
if community.hasCommunityChat(chatDto.id):
let communityChat = community.getCommunityChat(chatDto.id)

View File

@ -277,8 +277,12 @@ QtObject {
openPopup(importCommunitiesPopupComponent)
}
function openCommunityIntroPopup(communityId, name, introMessage,
imageSrc, isInvitationPending) {
function openCommunityIntroPopup(communityId,
name,
introMessage,
imageSrc,
isInvitationPending
) {
openPopup(communityJoinDialogPopup,
{communityId: communityId,
communityName: name,
@ -712,11 +716,11 @@ QtObject {
store: root.communitiesStore
onJoinCommunityRequested: {
close()
communitiesStore.spectateCommunity(communityId)
openCommunityIntroPopup(communityId,
communityDetails.name,
communityDetails.introMessage,
communityDetails.image,
communityDetails.access,
root.rootStore.isMyCommunityRequestPending(communityId))
}
onClosed: destroy()