Copy shared contact number from the context menu.

Fixes #6147.
This commit is contained in:
John Preston 2019-07-04 10:36:48 +02:00
parent 0a63eac4f6
commit 10ee81f466
1 changed files with 5 additions and 0 deletions

View File

@ -1703,6 +1703,11 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
});
}
}
} else if (const auto contact = media->sharedContact()) {
const auto phone = contact->phoneNumber;
_menu->addAction(tr::lng_profile_copy_phone(tr::now), [=] {
QApplication::clipboard()->setText(phone);
});
}
}
if (msg && view && !link && (view->hasVisibleText() || mediaHasTextForCopy)) {