mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 20:40:18 +00:00
fix: code review + reset sticker pack pending state
This commit is contained in:
parent
d0bca7afa6
commit
e4ffc897d7
@ -80,6 +80,8 @@ proc handleChatEvents(self: ChatController) =
|
||||
self.view.transactionCompleted(tx.success, tx.transactionHash, tx.revertReason)
|
||||
if tx.success:
|
||||
self.view.installStickerPack(tx.data.parseInt)
|
||||
else:
|
||||
self.view.resetStickerPackBuyAttempt(tx.data.parseInt)
|
||||
|
||||
proc handleMailserverEvents(self: ChatController) =
|
||||
self.status.events.on("mailserverTopics") do(e: Args):
|
||||
|
@ -269,6 +269,9 @@ QtObject:
|
||||
proc installStickerPack*(self: ChatsView, packId: int) {.slot.} =
|
||||
self.status.stickers.installStickerPack(packId)
|
||||
self.stickerPacks.updateStickerPackInList(packId, true, false)
|
||||
|
||||
proc resetStickerPackBuyAttempt*(self: ChatsView, packId: int) {.slot.} =
|
||||
self.stickerPacks.updateStickerPackInList(packId, false, false)
|
||||
|
||||
proc uninstallStickerPack*(self: ChatsView, packId: int) {.slot.} =
|
||||
self.status.stickers.uninstallStickerPack(packId)
|
||||
|
@ -242,7 +242,8 @@ Item {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
cursorShape: root.isPending ? Qt.ArrowCursor : Qt.PointingHandCursor
|
||||
enabled: !root.isPending
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if (root.isPending) return;
|
||||
if (root.isInstalled) return root.uninstallClicked();
|
||||
|
Loading…
x
Reference in New Issue
Block a user