fix(StatusStickerPackClickPopup): fix crash

the button to (un)install would be either greyed out or result in a crash:
- we were passing the popup a wrong store (w/o networkConnectionStore)
- the condition to `greyedOut` was inverted
This commit is contained in:
Lukáš Tinkl 2023-04-12 13:23:33 +02:00 committed by Lukáš Tinkl
parent 86a58d3298
commit e506bbfd6b
2 changed files with 2 additions and 3 deletions

View File

@ -87,7 +87,7 @@ StatusSectionLayout {
emojiPopup: root.emojiPopup
stickersPopup: root.stickersPopup
onOpenStickerPackPopup: {
Global.openPopup(statusStickerPackClickPopup, {packId: stickerPackId} )
Global.openPopup(statusStickerPackClickPopup, {packId: stickerPackId, store: root.stickersPopup.store} )
}
onOpenAppSearch: {
root.openAppSearch();
@ -167,7 +167,6 @@ StatusSectionLayout {
Component {
id: statusStickerPackClickPopup
StatusStickerPackClickPopup{
store: root.rootStore
onClosed: {
destroy();
}

View File

@ -125,7 +125,7 @@ ModalPopup {
isInstalled: installed
isBought: bought
isPending: pending
greyedOut: store.networkConnectionStore.stickersNetworkAvailable
greyedOut: !store.networkConnectionStore.stickersNetworkAvailable
tooltip.text: store.networkConnectionStore.stickersNetworkUnavailableText
onInstallClicked: {
stickersModule.install(packId);