summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-04-18 20:21:03 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-04-18 21:53:39 +0200
commitc2e625756ce74b2691ec10fc7c67d0920b6749ac (patch)
tree89b92cf4c1b043788fc3a30e2a2af6036c79f179 /src/timeline/TimelineViewManager.cpp
parentPrevent warning on empty user requests (diff)
downloadnheko-c2e625756ce74b2691ec10fc7c67d0920b6749ac.tar.xz
Use one CompletionProxy for everything including EmojiPicker
Diffstat (limited to 'src/timeline/TimelineViewManager.cpp')
-rw-r--r--src/timeline/TimelineViewManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index f15b0b14..e9986c7e 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -172,9 +172,6 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
         qRegisterMetaType<std::vector<DeviceInfo>>();
 
         qmlRegisterType<emoji::EmojiModel>("im.nheko.EmojiModel", 1, 0, "EmojiModel");
-        qmlRegisterType<emoji::EmojiProxyModel>("im.nheko.EmojiModel", 1, 0, "EmojiProxyModel");
-        qmlRegisterUncreatableType<QAbstractItemModel>(
-          "im.nheko.EmojiModel", 1, 0, "QAbstractItemModel", "Used by proxy models");
         qmlRegisterUncreatableType<emoji::Emoji>(
           "im.nheko.EmojiModel", 1, 0, "Emoji", "Used by emoji models");
         qmlRegisterUncreatableMetaObject(emoji::staticMetaObject,
@@ -595,6 +592,11 @@ TimelineViewManager::completerFor(QString completerName, QString roomId)
                 auto proxy      = new CompletionProxyModel(emojiModel);
                 emojiModel->setParent(proxy);
                 return proxy;
+        } else if (completerName == "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 == "room") {
                 auto roomModel = new RoomsModel(false);
                 auto proxy     = new CompletionProxyModel(roomModel, 4);