From e725e7982d9b42b51bcf593644d07bef5fac09cc Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 16 Mar 2021 13:11:17 +0100 Subject: [PATCH] fix(Communities): properly pass `admin` state to profile popup This was hardcoded into `isAdmin` for some reason. It also seems that the property isn't actually used anywhere in the profile popup, so we might as well get rid off it. --- .../Chat/CommunityComponents/CommunityHeaderButton.qml | 1 + .../Chat/CommunityComponents/CommunityProfilePopup.qml | 2 +- .../Chat/CommunityComponents/CommunityWelcomeBanner.qml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityHeaderButton.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityHeaderButton.qml index 60270456f9..e95ea6ada6 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityHeaderButton.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityHeaderButton.qml @@ -62,6 +62,7 @@ Button { communityProfilePopup.description = chatsModel.communities.activeCommunity.description; communityProfilePopup.access = chatsModel.communities.activeCommunity.access; communityProfilePopup.nbMembers = chatsModel.communities.activeCommunity.nbMembers; + communityProfilePopup.isAdmin = chatsModel.communities.activeCommunity.admin communityProfilePopup.open(); } hoverEnabled: true diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopup.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopup.qml index 85d6fdc223..6835948b68 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopup.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopup.qml @@ -16,7 +16,7 @@ ModalPopup { // TODO get the real image once it's available property string source: "../../../img/ens-header-dark@2x.png" property int nbMembers: community.nbMembers - property bool isAdmin: true // TODO: + property bool isAdmin: false height: (isAdmin ? 600 : 590) + descriptionText.height id: popup diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityWelcomeBanner.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityWelcomeBanner.qml index 50aa3b0c13..9255185acb 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityWelcomeBanner.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityWelcomeBanner.qml @@ -94,6 +94,7 @@ Rectangle { communityProfilePopup.description = chatsModel.communities.activeCommunity.description; communityProfilePopup.access = chatsModel.communities.activeCommunity.access; communityProfilePopup.nbMembers = chatsModel.communities.activeCommunity.nbMembers; + communityProfilePopup.isAdmin = chatsModel.communities.activeCommunity.admin; communityProfilePopup.open() } }