2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Add emoji-status disclaimer for unknown peers.

This commit is contained in:
John Preston
2022-09-06 11:20:55 +04:00
parent 400d4b793a
commit f0955f2021
15 changed files with 223 additions and 66 deletions

View File

@@ -498,17 +498,11 @@ auto PhoneNumberPrivacyController::warning() const
void PhoneNumberPrivacyController::prepareWarningLabel(
not_null<Ui::FlatLabel*> warning) const {
warning->setClickHandlerFilter([=](
const ClickHandlerPtr &link,
Qt::MouseButton button) {
if (button == Qt::LeftButton) {
QGuiApplication::clipboard()->setText(PublicLinkByPhone(
_controller->session().user()));
_controller->window().showToast(
tr::lng_username_copied(tr::now));
return false;
}
return true;
warning->overrideLinkClickHandler([=] {
QGuiApplication::clipboard()->setText(PublicLinkByPhone(
_controller->session().user()));
_controller->window().showToast(
tr::lng_username_copied(tr::now));
});
}