From 51084748ee4db5f7faab996147a85132cbb80031 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 25 May 2023 21:50:54 +0200 Subject: Make default completer complete custom emoji --- src/timeline/TimelineViewManager.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/timeline/TimelineViewManager.cpp') 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(-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(-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); -- cgit 1.4.1