chore: disable stickers popup when no stickers available

This is needed so that statusChatInput can work for the timeline without
exploding. Timeline doesn't need stickers
This commit is contained in:
Pascal Precht 2020-12-04 13:14:18 +01:00 committed by Pascal Precht
parent c11eb69ac1
commit 0957ec1ded
2 changed files with 5 additions and 4 deletions

View File

@ -23,8 +23,8 @@ Rectangle {
property bool isReply: false
property bool isImage: false
property var recentStickers: StickerData {}
property var stickerPackList: StickerPackData {}
property var recentStickers
property var stickerPackList
property int extraHeightFactor: calculateExtraHeightFactor()
property int messageLimit: 2000
@ -477,10 +477,9 @@ Rectangle {
StatusStickersPopup {
id: stickersPopup
width: 360
height: 440
x: parent.width - width - Style.current.halfPadding
y: -height
enabled: !!control.recentStickers && !!control.stickerPackList
recentStickers: control.recentStickers
stickerPackList: control.stickerPackList
onStickerSelected: {

View File

@ -12,6 +12,8 @@ Popup {
property var recentStickers: StickerData {}
property var stickerPackList: StickerPackData {}
signal stickerSelected(string hashId, string packId)
width: 360
height: 440
modal: false
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
background: Rectangle {