diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-25 21:50:54 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-05-25 21:53:23 +0200 |
commit | 51084748ee4db5f7faab996147a85132cbb80031 (patch) | |
tree | 4bb744783aeddc95979a0b567a872a7cd480b95d /src/timeline/TimelineViewManager.cpp | |
parent | Get rid of old emoji picker (diff) | |
download | nheko-51084748ee4db5f7faab996147a85132cbb80031.tar.xz |
Make default completer complete custom emoji
Diffstat (limited to '')
-rw-r--r-- | src/timeline/TimelineViewManager.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 4b6a791f..e062dde2 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -27,7 +27,6 @@ #include "UserSettingsPage.h" #include "UsersModel.h" #include "Utils.h" -#include "emoji/EmojiModel.h" #include "encryption/VerificationManager.h" #include "voip/CallManager.h" #include "voip/WebRTCSession.h" @@ -454,15 +453,10 @@ TimelineViewManager::completerFor(const QString &completerName, const QString &r userModel->setParent(proxy); return proxy; } else if (completerName == QLatin1String("emoji")) { - auto emojiModel = new emoji::EmojiModel(); + auto emojiModel = new CombinedImagePackModel(roomId.toStdString()); auto proxy = new CompletionProxyModel(emojiModel); emojiModel->setParent(proxy); return proxy; - } else if (completerName == QLatin1String("allemoji")) { - auto emojiModel = new emoji::EmojiModel(); - auto proxy = new CompletionProxyModel(emojiModel, 1, static_cast<size_t>(-1) / 4); - emojiModel->setParent(proxy); - return proxy; } else if (completerName == QLatin1String("room")) { auto roomModel = new RoomsModel(false); auto proxy = new CompletionProxyModel(roomModel, 4); @@ -473,22 +467,12 @@ TimelineViewManager::completerFor(const QString &completerName, const QString &r auto proxy = new CompletionProxyModel(roomModel); roomModel->setParent(proxy); return proxy; - } else if (completerName == QLatin1String("stickers")) { - auto stickerModel = new CombinedImagePackModel(roomId.toStdString(), true); - auto proxy = new CompletionProxyModel(stickerModel, 1, static_cast<size_t>(-1) / 4); - stickerModel->setParent(proxy); - return proxy; } else if (completerName == QLatin1String("emojigrid")) { auto stickerModel = new GridImagePackModel(roomId.toStdString(), false); return stickerModel; } else if (completerName == QLatin1String("stickergrid")) { auto stickerModel = new GridImagePackModel(roomId.toStdString(), true); return stickerModel; - } else if (completerName == QLatin1String("customEmoji")) { - auto stickerModel = new CombinedImagePackModel(roomId.toStdString(), false); - auto proxy = new CompletionProxyModel(stickerModel); - stickerModel->setParent(proxy); - return proxy; } else if (completerName == QLatin1String("command")) { auto commandCompleter = new CommandCompleter(); auto proxy = new CompletionProxyModel(commandCompleter); |