summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMayeul Cantan <oss+nheko@mayeul.net>2020-10-31 23:05:13 +0100
committerMayeul Cantan <oss+nheko@mayeul.net>2020-10-31 23:13:11 +0100
commita66046aaf00467fbc8765e3e42dc32c46a95c70a (patch)
treef6c10d419a4ce6de14b8be7226f1e5bcb6709718 /src
parentTranslated using Weblate (English) (diff)
downloadnheko-a66046aaf00467fbc8765e3e42dc32c46a95c70a.tar.xz
Allow sending text after `shrug`
¯\_(ツ)_/¯ IDK, I like to write something after, sometimes

Allow sending:

¯\_(ツ)_/¯ some text

By entering:

/shrug some text

It's supported in Element. If you did it in nheko, you just used to lose the
extra text.

Not putting text is still supported, a ternary operator makes sure a
space is only inserted if the text isn't empty, to avoid having a trailing
space.
Diffstat (limited to 'src')
-rw-r--r--src/TextInputWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp

index e6a10f0a..c23af2c0 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp
@@ -703,7 +703,7 @@ TextInputWidget::command(QString command, QString args) } else if (command == "roomnick") { emit changeRoomNick(args); } else if (command == "shrug") { - emit sendTextMessage("¯\\_(ツ)_/¯"); + emit sendTextMessage("¯\\_(ツ)_/¯" + (args.isEmpty() ? "" : " " + args)); } else if (command == "fliptable") { emit sendTextMessage("(╯°□°)╯︵ ┻━┻"); } else if (command == "unfliptable") {