fix(@desktop/chat): If profile popup is opened close it before another opening
Fix #6650
This commit is contained in:
parent
27c883ae98
commit
58fe1ed8ca
|
@ -51,6 +51,8 @@ Item {
|
|||
// set from main.qml
|
||||
property var sysPalette
|
||||
|
||||
signal closeProfilePopup()
|
||||
|
||||
Connections {
|
||||
target: rootStore.mainModuleInst
|
||||
|
||||
|
@ -121,6 +123,9 @@ Item {
|
|||
}
|
||||
|
||||
onOpenProfilePopupRequested: {
|
||||
if (Global.profilePopupOpened) {
|
||||
appMain.closeProfilePopup()
|
||||
}
|
||||
Global.openPopup(profilePopupComponent, {publicKey: publicKey, parentPopup: parentPopup})
|
||||
Global.profilePopupOpened = true
|
||||
}
|
||||
|
@ -210,6 +215,7 @@ Item {
|
|||
id: profilePopup
|
||||
profileStore: appMain.rootStore.profileSectionStore.profileStore
|
||||
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
||||
|
||||
onClosed: {
|
||||
if (profilePopup.parentPopup) {
|
||||
profilePopup.parentPopup.close()
|
||||
|
@ -217,6 +223,10 @@ Item {
|
|||
Global.profilePopupOpened = false
|
||||
destroy()
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
appMain.closeProfilePopup.connect(profilePopup.close)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue