summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-20 04:33:11 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 19:05:12 +0100
commit094c0b09abba70e5e4cec5740f918ae56971f3e7 (patch)
tree47975f5972a513ced328ee9c363549c840fad30d /src/timeline/InputBar.cpp
parentSimple prefix match for completions (diff)
downloadnheko-094c0b09abba70e5e4cec5740f918ae56971f3e7.tar.xz
Qml emoji completer
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 641d8379..5c8f0f11 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -25,6 +25,7 @@
 #include "Utils.h"
 #include "dialogs/PlaceCall.h"
 #include "dialogs/PreviewUploadOverlay.h"
+#include "emoji/EmojiModel.h"
 
 #include "blurhash.hpp"
 
@@ -173,6 +174,11 @@ InputBar::completerFor(QString completerName)
                 auto proxy     = new CompletionProxyModel(userModel);
                 userModel->setParent(proxy);
                 return proxy;
+        } else if (completerName == "emoji") {
+                auto emojiModel = new emoji::EmojiModel();
+                auto proxy      = new CompletionProxyModel(emojiModel);
+                emojiModel->setParent(proxy);
+                return proxy;
         }
         return nullptr;
 }