From c8d2e39329f3720c97cc214b1335c7e6760ef49a Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 28 Oct 2024 13:14:25 -0400 Subject: [PATCH] fix(communities): fix missing members in community settings (#16634) Fixes #16627 I had missed that the community settings also used the members. Fixed by using the model adaptor and using the right property name --- ui/app/AppLayouts/Chat/views/qmldir | 3 ++- .../AppLayouts/Profile/panels/CommunitiesListPanel.qml | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/app/AppLayouts/Chat/views/qmldir b/ui/app/AppLayouts/Chat/views/qmldir index f142477de7..8f5bf455b0 100644 --- a/ui/app/AppLayouts/Chat/views/qmldir +++ b/ui/app/AppLayouts/Chat/views/qmldir @@ -1,3 +1,4 @@ CreateChatView 1.0 CreateChatView.qml -MembersSelectorView 1.0 MembersSelectorView.qml MembersEditSelectorView 1.0 MembersEditSelectorView.qml +MembersModelAdaptor 1.0 MembersModelAdaptor.qml +MembersSelectorView 1.0 MembersSelectorView.qml diff --git a/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml b/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml index a1a90e7fae..31eb7334b0 100644 --- a/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml @@ -1,6 +1,7 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 +import StatusQ 0.1 import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Components 0.1 @@ -10,6 +11,7 @@ import StatusQ.Popups 0.1 import utils 1.0 import shared.controls.chat.menuItems 1.0 import AppLayouts.stores 1.0 as AppLayoutsStores +import AppLayouts.Chat.views 1.0 StatusListView { id: root @@ -32,6 +34,12 @@ StatusListView { delegate: StatusListItem { id: listItem + + MembersModelAdaptor { + id: membersModelAdaptor + allMembers: model.allMembers + } + width: ListView.view.width title: model.name statusListItemTitle.font.pixelSize: 17 @@ -39,7 +47,7 @@ StatusListView { statusListItemIcon.anchors.verticalCenter: undefined statusListItemIcon.anchors.top: statusListItemTitleArea.top subTitle: model.description - tertiaryTitle: qsTr("%n member(s)", "", model.members.count) + tertiaryTitle: qsTr("%n member(s)", "", membersModelAdaptor.joinedMembers.ModelCount.count) statusListItemTertiaryTitle.font.weight: Font.Medium asset.name: model.image asset.isLetterIdenticon: !model.image