summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-03-07 00:18:24 +0530
committerJedi18 <targetakhil@gmail.com>2021-03-07 00:18:24 +0530
commit8870455f9dd6463f9b8ef04516d69efef3c6287d (patch)
tree475f1eef9c90c1149e8dd8cf6bdf594be606c949 /src/timeline
parentchanged bottomToTop to true and renamed textWidth to textHeight (diff)
downloadnheko-8870455f9dd6463f9b8ef04516d69efef3c6287d.tar.xz
change allowed mistakes, fix minor style issues, remove old completer function from inputbar
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/InputBar.cpp22
-rw-r--r--src/timeline/InputBar.h2
-rw-r--r--src/timeline/TimelineViewManager.cpp2
3 files changed, 1 insertions, 25 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp

index 5ef38ac7..ab0fc3d7 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -174,28 +174,6 @@ InputBar::nextText() return text(); } -QObject * -InputBar::completerFor(QString completerName) -{ - if (completerName == "user") { - auto userModel = new UsersModel(room->roomId().toStdString()); - 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; - } else if (completerName == "room") { - auto roomModel = new RoomsModel(true); - auto proxy = new CompletionProxyModel(roomModel); - roomModel->setParent(proxy); - return proxy; - } - return nullptr; -} - void InputBar::send() { diff --git a/src/timeline/InputBar.h b/src/timeline/InputBar.h
index 696a0dd9..678d953d 100644 --- a/src/timeline/InputBar.h +++ b/src/timeline/InputBar.h
@@ -51,8 +51,6 @@ public slots: bool uploading() const { return uploading_; } void message(QString body, MarkdownOverride useMarkdown = MarkdownOverride::NOT_SPECIFIED); - QObject *completerFor(QString completerName); - private slots: void startTyping(); void stopTyping(); diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 7d74496d..04af7060 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -577,7 +577,7 @@ TimelineViewManager::completerFor(QString completerName, QString roomId) return proxy; } else if (completerName == "room") { auto roomModel = new RoomsModel(false); - auto proxy = new CompletionProxyModel(roomModel); + auto proxy = new CompletionProxyModel(roomModel, 4); roomModel->setParent(proxy); return proxy; } else if (completerName == "roomAliases") {