2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

New profile blocks started. Info block fully ready.

All block widgets added (currently empty).
About text and phone number PeerUpdateFlag added for observers.
This commit is contained in:
John Preston
2016-05-31 22:27:11 +03:00
parent a06a989f97
commit 41c8df029a
48 changed files with 1342 additions and 165 deletions

View File

@@ -4389,9 +4389,16 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
case mtpc_updateUserPhone: {
auto &d(update.c_updateUserPhone());
if (auto user = App::userLoaded(d.vuser_id.v)) {
user->setPhone(qs(d.vphone));
user->setNameDelayed(user->firstName, user->lastName, (user->contact || isServiceUser(user->id) || user->isSelf() || user->phone.isEmpty()) ? QString() : App::formatPhone(user->phone), user->username);
App::markPeerUpdated(user);
auto newPhone = qs(d.vphone);
if (newPhone != user->phone()) {
user->setPhone(newPhone);
user->setNameDelayed(user->firstName, user->lastName, (user->contact || isServiceUser(user->id) || user->isSelf() || user->phone().isEmpty()) ? QString() : App::formatPhone(user->phone()), user->username);
App::markPeerUpdated(user);
Notify::PeerUpdate update(user);
update.flags |= Notify::PeerUpdateFlag::UserPhoneChanged;
Notify::peerUpdatedDelayed(update);
}
}
} break;