parent
fc47aa0da9
commit
5dcca4482a
|
@ -2399,11 +2399,16 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
}, &st::menuIconForward);
|
}, &st::menuIconForward);
|
||||||
}
|
}
|
||||||
if (item->canDelete()) {
|
if (item->canDelete()) {
|
||||||
_menu->addAction(Ui::DeleteMessageContextAction(
|
const auto callback = [=] { deleteItem(itemId); };
|
||||||
_menu->menu(),
|
if (item->isUploading()) {
|
||||||
[=] { deleteItem(itemId); },
|
_menu->addAction(tr::lng_context_cancel_upload(tr::now), callback, &st::menuIconCancel);
|
||||||
item->ttlDestroyAt(),
|
} else {
|
||||||
[=] { _menu = nullptr; }));
|
_menu->addAction(Ui::DeleteMessageContextAction(
|
||||||
|
_menu->menu(),
|
||||||
|
callback,
|
||||||
|
item->ttlDestroyAt(),
|
||||||
|
[=] { _menu = nullptr; }));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!blockSender && item->suggestReport()) {
|
if (!blockSender && item->suggestReport()) {
|
||||||
_menu->addAction(tr::lng_context_report_msg(tr::now), [=] {
|
_menu->addAction(tr::lng_context_report_msg(tr::now), [=] {
|
||||||
|
@ -2744,9 +2749,12 @@ void HistoryInner::copyContextImage(
|
||||||
FullMsgId itemId) {
|
FullMsgId itemId) {
|
||||||
const auto item = session().data().message(itemId);
|
const auto item = session().data().message(itemId);
|
||||||
const auto media = photo->activeMediaView();
|
const auto media = photo->activeMediaView();
|
||||||
|
const auto restricted = item
|
||||||
|
? showCopyMediaRestriction(item)
|
||||||
|
: IsServerMsgId(itemId.msg);
|
||||||
if (photo->isNull() || !media || !media->loaded()) {
|
if (photo->isNull() || !media || !media->loaded()) {
|
||||||
return;
|
return;
|
||||||
} else if (!showCopyMediaRestriction(item)) {
|
} else if (!restricted) {
|
||||||
media->setToClipboard();
|
media->setToClipboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user