From 0b1538c805d24462f53841a5047198603fa80e36 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 2 Dec 2021 12:39:15 +0100 Subject: [PATCH] fix(@desktop/communities): Close popup when edit is successful fixes #4126 When saving the communities all the popup are closed --- .../AppLayouts/Chat/popups/community/CommunityProfilePopup.qml | 3 ++- .../AppLayouts/Chat/popups/community/CreateCommunityPopup.qml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml b/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml index fb885f3699..4916560aae 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml @@ -65,7 +65,8 @@ StatusModal { } onEditButtonClicked: openPopup(editCommunityPopup, { store: root.store, - community: root.community + community: root.community, + onSave: root.close }) onTransferOwnershipButtonClicked: openPopup(transferOwnershiproot, { privateKey: root.store.exportCommunity(), diff --git a/ui/app/AppLayouts/Chat/popups/community/CreateCommunityPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CreateCommunityPopup.qml index 604531ffdb..dbc496f74a 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CreateCommunityPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CreateCommunityPopup.qml @@ -21,6 +21,7 @@ StatusModal { property var store property bool isEdit: false property QtObject community: popup.store.chatsModelInst.communities.activeCommunity + property var onSave: () => {} readonly property int maxCommunityNameLength: 30 readonly property int maxCommunityDescLength: 140 readonly property var communityColorValidator: Utils.Validate.NoEmpty @@ -438,7 +439,7 @@ StatusModal { creatingError.text = error.error return creatingError.open() } - + popup.onSave() popup.close() } }