summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2023-02-27 18:12:19 -0500
committerLoren Burkholder <computersemiexpert@outlook.com>2023-02-28 20:10:25 -0500
commitb4f8d4947ff517ae1498d5787ebb34ca3803ad13 (patch)
treee85169b7add5e3918a20791e4784df5bc002f24e /src
parentMove command calculation logic into InputBar (diff)
downloadnheko-b4f8d4947ff517ae1498d5787ebb34ca3803ad13.tar.xz
Simplify code a bit
Diffstat (limited to 'src')
-rw-r--r--src/CompletionProxyModel.h2
-rw-r--r--src/timeline/InputBar.cpp3
2 files changed, 1 insertions, 4 deletions
diff --git a/src/CompletionProxyModel.h b/src/CompletionProxyModel.h
index 90daf7ad..e0f00788 100644
--- a/src/CompletionProxyModel.h
+++ b/src/CompletionProxyModel.h
@@ -184,8 +184,6 @@ public slots:
     void setSearchString(const QString &s);
     QString searchString() const { return searchString_; }
 
-    bool hasCompletion() const { return rowCount() > 0; }
-
 signals:
     void newSearchString(QString);
 
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 6c882cd4..2491b5c1 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -390,8 +390,7 @@ InputBar::send()
 
     auto wasEdit = !room->edit().isEmpty();
 
-    auto [commandName, args] = getCommandAndArgs();
-    if (commandName.isNull())
+    if (auto [commandName, args] = getCommandAndArgs(); commandName.isNull())
         message(text());
     else
         command(commandName, args);