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.
This commit is contained in:
Pascal Precht 2021-03-16 13:11:17 +01:00 committed by Iuri Matias
parent 410851da33
commit e725e7982d
3 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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()
}
}