summary refs log tree commit diff
path: root/src/CombinedImagePackModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-07-21 13:37:57 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-07-23 17:43:17 +0200
commiteafbab6ae128dd5b14f145ba9214a6673e982951 (patch)
tree47cb8bd57501ef2d6da1b1e128ac2c431e4a6553 /src/CombinedImagePackModel.cpp
parentRename image pack model (diff)
downloadnheko-eafbab6ae128dd5b14f145ba9214a6673e982951.tar.xz
Add menu to enable or disable stickers globally
Diffstat (limited to '')
-rw-r--r--src/CombinedImagePackModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CombinedImagePackModel.cpp b/src/CombinedImagePackModel.cpp

index c5b5b886..341a34ec 100644 --- a/src/CombinedImagePackModel.cpp +++ b/src/CombinedImagePackModel.cpp
@@ -16,9 +16,10 @@ CombinedImagePackModel::CombinedImagePackModel(const std::string &roomId, auto packs = cache::client()->getImagePacks(room_id, stickers); for (const auto &pack : packs) { - QString packname = QString::fromStdString(pack.packname); + QString packname = + pack.pack.pack ? QString::fromStdString(pack.pack.pack->display_name) : ""; - for (const auto &img : pack.images) { + for (const auto &img : pack.pack.images) { ImageDesc i{}; i.shortcode = QString::fromStdString(img.first); i.packname = packname;