Reply-in-another-chat by Ctrl+Click on Reply.

This commit is contained in:
John Preston 2024-05-28 10:59:46 +04:00
parent 32cd2120ac
commit b9f63f80f1
3 changed files with 7 additions and 11 deletions

View File

@ -2399,7 +2399,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
const auto quoteOffset = selected.offset;
text.replace('&', u"&&"_q);
_menu->addAction(text, [=] {
if (canSendReply) {
if (canSendReply && !base::IsCtrlPressed()) {
_widget->replyToMessage({
.messageId = itemId,
.quote = quote,

View File

@ -632,15 +632,11 @@ bool AddReplyToMessageAction(
text.replace('&', u"&&"_q);
const auto itemId = item->fullId();
menu->addAction(text, [=] {
if (!item) {
return;
} else {
list->replyToMessageRequestNotify({
.messageId = itemId,
.quote = quote.text,
.quoteOffset = quote.offset,
});
}
list->replyToMessageRequestNotify({
.messageId = itemId,
.quote = quote.text,
.quoteOffset = quote.offset,
});
}, &st::menuIconReply);
return true;
}

View File

@ -327,7 +327,7 @@ RepliesWidget::RepliesWidget(
const auto canSendReply = _topic
? Data::CanSendAnything(_topic)
: Data::CanSendAnything(_history->peer);
if (_joinGroup || !canSendReply) {
if (_joinGroup || !canSendReply || base::IsCtrlPressed()) {
Controls::ShowReplyToChatBox(controller->uiShow(), { fullId });
} else {
replyToMessage(fullId);