fix: use a component instead of a loader to show sticker modal

This commit is contained in:
Richard Ramos 2021-01-20 16:30:21 -04:00 committed by Iuri Matias
parent d8345c5e0e
commit ed7ba12d4d
1 changed files with 5 additions and 11 deletions

View File

@ -80,7 +80,7 @@ Item {
onCancelClicked: root.cancelClicked(packId)
onUpdateClicked: root.updateClicked(packId)
onBuyClicked: {
stickerPackPurchaseModal.open()
openPopup(stickerPackPurchaseModal)
root.buyClicked(packId)
}
}
@ -92,16 +92,9 @@ Item {
height: 350
}
}
Loader {
Component {
id: stickerPackPurchaseModal
function open() {
this.active = true
this.item.open()
}
function closed() {
this.active = false // kill an opened instance
}
sourceComponent: StatusStickerPackPurchaseModal {
StatusStickerPackPurchaseModal {
onClosed: {
stickerPackPurchaseModal.closed()
}
@ -112,6 +105,7 @@ Item {
showBackBtn: stickerPackDetailsPopup.opened
}
}
StatusStickerPackDetails {
id: stickerPackDetails
height: 64 - (Style.current.smallPadding * 2)
@ -137,7 +131,7 @@ Item {
onCancelClicked: root.cancelClicked(packId)
onUpdateClicked: root.updateClicked(packId)
onBuyClicked: {
stickerPackPurchaseModal.open()
openPopup(stickerPackPurchaseModal)
root.buyClicked(packId)
}
}