2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow to edit Bio in Settings.

This commit is contained in:
John Preston
2017-07-18 18:15:02 +03:00
parent 9bd89121e8
commit 34d2e78308
13 changed files with 202 additions and 46 deletions

View File

@@ -3995,7 +3995,7 @@ void MainWidget::mtpPing() {
void MainWidget::start(const MTPUser *self) {
if (!self) {
MTP::send(MTPusers_GetUsers(MTP_vector<MTPInputUser>(1, MTP_inputUserSelf())), rpcDone(&MainWidget::startWithSelf));
MTP::send(MTPusers_GetFullUser(MTP_inputUserSelf()), rpcDone(&MainWidget::startWithSelf));
return;
}
if (!AuthSession::Current().validateSelf(*self)) {
@@ -4227,13 +4227,13 @@ bool MainWidget::inviteImportFail(const RPCError &error) {
return true;
}
void MainWidget::startWithSelf(const MTPVector<MTPUser> &users) {
auto &v = users.v;
if (v.isEmpty()) {
LOG(("Auth Error: self user not received."));
return App::logOutDelayed();
void MainWidget::startWithSelf(const MTPUserFull &result) {
Expects(result.type() == mtpc_userFull);
auto &d = result.c_userFull();
start(&d.vuser);
if (auto user = App::self()) {
App::api()->processFullPeer(user, result);
}
start(&v[0]);
}
void MainWidget::applyNotifySetting(const MTPNotifyPeer &peer, const MTPPeerNotifySettings &settings, History *h) {