mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: retain text from input when replying (#3989)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
be72d73c3d
commit
6a2c4fc098
2 changed files with 8 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Unversioned
|
||||
|
||||
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722)
|
||||
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989)
|
||||
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
|
||||
- Minor: Added option to display tabs on the right and bottom. (#3847)
|
||||
- Minor: Added `is:first-msg` search option. (#3700)
|
||||
|
|
|
@ -978,9 +978,13 @@ void SplitInput::setReply(std::shared_ptr<MessageThread> reply,
|
|||
if (this->enableInlineReplying_)
|
||||
{
|
||||
// Only enable reply label if inline replying
|
||||
this->ui_.textEdit->setPlainText(
|
||||
"@" + this->replyThread_->root()->displayName + " ");
|
||||
this->ui_.textEdit->moveCursor(QTextCursor::EndOfBlock);
|
||||
auto replyPrefix = "@" + this->replyThread_->root()->displayName + " ";
|
||||
auto plainText = this->ui_.textEdit->toPlainText().trimmed();
|
||||
if (!plainText.startsWith(replyPrefix))
|
||||
{
|
||||
this->ui_.textEdit->setPlainText(replyPrefix + plainText + " ");
|
||||
this->ui_.textEdit->moveCursor(QTextCursor::EndOfBlock);
|
||||
}
|
||||
this->ui_.replyLabel->setText("Replying to @" +
|
||||
this->replyThread_->root()->displayName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue