mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: Double-space when using replies with an empty input box (#4041)
This commit is contained in:
parent
25bccc90b4
commit
d5b8d89494
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Unversioned
|
||||
|
||||
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989)
|
||||
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989, #4041)
|
||||
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
|
||||
- Minor: Added highlights for `Elevated Messages`. (#4016)
|
||||
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
|
||||
|
|
|
@ -977,10 +977,14 @@ void SplitInput::setReply(std::shared_ptr<MessageThread> reply,
|
|||
if (this->enableInlineReplying_)
|
||||
{
|
||||
// Only enable reply label if inline replying
|
||||
auto replyPrefix = "@" + this->replyThread_->root()->displayName + " ";
|
||||
auto replyPrefix = "@" + this->replyThread_->root()->displayName;
|
||||
auto plainText = this->ui_.textEdit->toPlainText().trimmed();
|
||||
if (!plainText.startsWith(replyPrefix))
|
||||
{
|
||||
if (!plainText.isEmpty())
|
||||
{
|
||||
replyPrefix.append(' ');
|
||||
}
|
||||
this->ui_.textEdit->setPlainText(replyPrefix + plainText + " ");
|
||||
this->ui_.textEdit->moveCursor(QTextCursor::EndOfBlock);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue