mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Reply-in-another-chat by Ctrl+Click on Reply.
This commit is contained in:
parent
32cd2120ac
commit
b9f63f80f1
3 changed files with 7 additions and 11 deletions
|
@ -2399,7 +2399,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
const auto quoteOffset = selected.offset;
|
const auto quoteOffset = selected.offset;
|
||||||
text.replace('&', u"&&"_q);
|
text.replace('&', u"&&"_q);
|
||||||
_menu->addAction(text, [=] {
|
_menu->addAction(text, [=] {
|
||||||
if (canSendReply) {
|
if (canSendReply && !base::IsCtrlPressed()) {
|
||||||
_widget->replyToMessage({
|
_widget->replyToMessage({
|
||||||
.messageId = itemId,
|
.messageId = itemId,
|
||||||
.quote = quote,
|
.quote = quote,
|
||||||
|
|
|
@ -632,15 +632,11 @@ bool AddReplyToMessageAction(
|
||||||
text.replace('&', u"&&"_q);
|
text.replace('&', u"&&"_q);
|
||||||
const auto itemId = item->fullId();
|
const auto itemId = item->fullId();
|
||||||
menu->addAction(text, [=] {
|
menu->addAction(text, [=] {
|
||||||
if (!item) {
|
list->replyToMessageRequestNotify({
|
||||||
return;
|
.messageId = itemId,
|
||||||
} else {
|
.quote = quote.text,
|
||||||
list->replyToMessageRequestNotify({
|
.quoteOffset = quote.offset,
|
||||||
.messageId = itemId,
|
});
|
||||||
.quote = quote.text,
|
|
||||||
.quoteOffset = quote.offset,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, &st::menuIconReply);
|
}, &st::menuIconReply);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,7 +327,7 @@ RepliesWidget::RepliesWidget(
|
||||||
const auto canSendReply = _topic
|
const auto canSendReply = _topic
|
||||||
? Data::CanSendAnything(_topic)
|
? Data::CanSendAnything(_topic)
|
||||||
: Data::CanSendAnything(_history->peer);
|
: Data::CanSendAnything(_history->peer);
|
||||||
if (_joinGroup || !canSendReply) {
|
if (_joinGroup || !canSendReply || base::IsCtrlPressed()) {
|
||||||
Controls::ShowReplyToChatBox(controller->uiShow(), { fullId });
|
Controls::ShowReplyToChatBox(controller->uiShow(), { fullId });
|
||||||
} else {
|
} else {
|
||||||
replyToMessage(fullId);
|
replyToMessage(fullId);
|
||||||
|
|
Loading…
Add table
Reference in a new issue