2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

0.7.26.dev - some bugs fixed

This commit is contained in:
John Preston
2015-03-26 12:35:21 +03:00
parent 8c7a35c973
commit e052a11326
8 changed files with 22 additions and 19 deletions

View File

@@ -712,11 +712,13 @@ void ProfileInner::contextMenuEvent(QContextMenuEvent *e) {
_menu->deleteLater();
_menu = 0;
}
if (!_phoneText.isEmpty()) {
if (!_phoneText.isEmpty() || (_peerUser && !_peerUser->username.isEmpty())) {
QRect info(_left + st::profilePhotoSize + st::profilePhoneLeft, st::profilePadding.top(), _width - st::profilePhotoSize - st::profilePhoneLeft, st::profilePhotoSize);
if (info.contains(mapFromGlobal(e->globalPos()))) {
_menu = new ContextMenu(this);
_menu->addAction(lang(lng_profile_copy_phone), this, SLOT(onCopyPhone()))->setEnabled(true);
if (!_phoneText.isEmpty()) {
_menu->addAction(lang(lng_profile_copy_phone), this, SLOT(onCopyPhone()))->setEnabled(true);
}
if (_peerUser && !_peerUser->username.isEmpty()) {
_menu->addAction(lang(lng_context_copy_mention), this, SLOT(onCopyUsername()))->setEnabled(true);
}
@@ -784,6 +786,7 @@ void ProfileInner::mediaOverviewUpdated(PeerData *peer) {
if (peer == _peer) {
resizeEvent(0);
showAll();
update();
}
}