diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2023-02-27 18:06:24 -0500 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2023-02-28 20:10:25 -0500 |
commit | 22ac5d861e487ff39749f5d2bdda9113689e4b63 (patch) | |
tree | 8031235b2d798b37d0d9add9e6f8ddfb7e4531a6 /resources | |
parent | Show warning when invalid command is entered (diff) | |
download | nheko-22ac5d861e487ff39749f5d2bdda9113689e4b63.tar.xz |
Move command calculation logic into InputBar
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/TimelineView.qml | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 5c982270..100ed1d7 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -159,17 +159,8 @@ Item { } MessageInputWarning { - text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(Nheko.getCommandFromText(input.text)) - isVisible: { - if (!input.text) - return false; - - let command = Nheko.getCommandFromText(input.text); - if (Nheko.isInvalidCommand(command) && ("/" + command !== input.text)) - return true; - else - return false; - } + text: qsTr("The command /%1 is not recognized and will be sent as part of your message").arg(room ? room.input.currentCommand : "") + isVisible: room ? room.input.containsInvalidCommand : false } ReplyPopup { |