diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-19 17:45:55 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-19 17:45:55 +0200 |
commit | 11c96664089e1437be1eb0ae8bca6c051da5e950 (patch) | |
tree | 3cd5f1af183a926bc6335694639f3dacf397d11d /resources/qml/emoji/StickerPicker.qml | |
parent | Fix replying and editing stickers (diff) | |
download | nheko-11c96664089e1437be1eb0ae8bca6c051da5e950.tar.xz |
Cache sticker picker
Diffstat (limited to 'resources/qml/emoji/StickerPicker.qml')
-rw-r--r-- | resources/qml/emoji/StickerPicker.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index eca302eb..a3d01d7a 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -15,7 +15,7 @@ Menu { property var callback property var colors - property alias model: gridView.model + property string roomid property var textArea property real highlightHue: Nheko.colors.highlight.hslHue property real highlightSat: Nheko.colors.highlight.hslSaturation @@ -24,9 +24,9 @@ Menu { readonly property int stickerDimPad: 128 + Nheko.paddingSmall readonly property int stickersPerRow: 3 - function show(showAt, model_, callback) { + function show(showAt, roomid_, callback) { console.debug("Showing sticker picker"); - model = model_; + roomid = roomid_; stickerPopup.callback = callback; popup(showAt ? showAt : null); } @@ -120,6 +120,8 @@ Menu { GridView { id: gridView + model: roomid ? TimelineManager.completerFor("stickers", roomid) : null + Layout.preferredHeight: cellHeight * 3.5 Layout.preferredWidth: stickersPerRow * stickerDimPad + 20 Layout.leftMargin: 4 |