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
|
// set from main.qml
|
||||||
property var sysPalette
|
property var sysPalette
|
||||||
|
|
||||||
|
signal closeProfilePopup()
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: rootStore.mainModuleInst
|
target: rootStore.mainModuleInst
|
||||||
|
|
||||||
|
@ -121,6 +123,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpenProfilePopupRequested: {
|
onOpenProfilePopupRequested: {
|
||||||
|
if (Global.profilePopupOpened) {
|
||||||
|
appMain.closeProfilePopup()
|
||||||
|
}
|
||||||
Global.openPopup(profilePopupComponent, {publicKey: publicKey, parentPopup: parentPopup})
|
Global.openPopup(profilePopupComponent, {publicKey: publicKey, parentPopup: parentPopup})
|
||||||
Global.profilePopupOpened = true
|
Global.profilePopupOpened = true
|
||||||
}
|
}
|
||||||
|
@ -210,6 +215,7 @@ Item {
|
||||||
id: profilePopup
|
id: profilePopup
|
||||||
profileStore: appMain.rootStore.profileSectionStore.profileStore
|
profileStore: appMain.rootStore.profileSectionStore.profileStore
|
||||||
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
||||||
|
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (profilePopup.parentPopup) {
|
if (profilePopup.parentPopup) {
|
||||||
profilePopup.parentPopup.close()
|
profilePopup.parentPopup.close()
|
||||||
|
@ -217,6 +223,10 @@ Item {
|
||||||
Global.profilePopupOpened = false
|
Global.profilePopupOpened = false
|
||||||
destroy()
|
destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
appMain.closeProfilePopup.connect(profilePopup.close)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue