fix(@desktop/communities): Close popup when edit is successful

fixes #4126

When saving the communities all the popup are closed
This commit is contained in:
Anthony Laibe 2021-12-02 12:39:15 +01:00
parent 2039748072
commit 0b1538c805
2 changed files with 4 additions and 2 deletions

View File

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

View File

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