fix: don't clear message when closing reply (#6145)

This commit is contained in:
pajlada
2025-04-12 13:31:02 +02:00
committed by GitHub
parent 7c8274ed56
commit 9cde7f8231
2 changed files with 48 additions and 36 deletions
+1
View File
@@ -11,6 +11,7 @@
- Bugfix: Fixed scrolling now working on inputs in the settings. (#6128)
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
- Bugfix: Fixed missing BetterTTV live updates of emotes. (#6132)
- Bugfix: Fixed message contents being cleared when using the close button for replies. (#6145)
- Bugfix: Handle <kbd>CMD</kbd> + <kbd>BACKSPACE</kbd> behavior explicitly in main chat dialog input for macOS. (#6111)
- Bugfix: Fixed a small typo in the settings page. (#6134)
- Bugfix: Fixed some Twitch commands not getting tab-completed correctly. (#6143)
+14 -3
View File
@@ -190,10 +190,10 @@ void SplitInput::initLayout()
this->openEmotePopup();
});
// clear input and remove reply target
// remove reply target
QObject::connect(this->ui_.cancelReplyButton, &EffectLabel::leftClicked,
[this] {
this->clearInput();
this->setReply(nullptr);
});
// Forward selection change signal
@@ -1146,7 +1146,8 @@ void SplitInput::setReply(MessagePtr target)
this->ui_.textEdit->resetCompletion();
}
assert(target != nullptr);
if (target != nullptr)
{
this->replyTarget_ = std::move(target);
if (this->enableInlineReplying_)
@@ -1194,6 +1195,16 @@ void SplitInput::setReply(MessagePtr target)
this->ui_.replyLabel->setText("Replying to @" +
this->replyTarget_->displayName);
}
}
else
{
this->replyTarget_.reset();
if (this->enableInlineReplying_)
{
this->clearReplyTarget();
}
}
}
void SplitInput::setPlaceholderText(const QString &text)