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

added any profile photo delete, fixed profile photo upload

This commit is contained in:
John Preston
2016-02-26 12:29:07 +03:00
parent 39981835ce
commit 1bd986d2cb
5 changed files with 33 additions and 7 deletions

View File

@@ -951,7 +951,7 @@ void AppClass::killDownloadSessions() {
}
}
void AppClass::photoUpdated(const FullMsgId &msgId, const MTPInputFile &file) {
void AppClass::photoUpdated(const FullMsgId &msgId, bool silent, const MTPInputFile &file) {
if (!App::self()) return;
QMap<FullMsgId, PeerId>::iterator i = photoUpdates.find(msgId);
@@ -1040,7 +1040,7 @@ void AppClass::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) {
ReadyLocalMedia ready(PreparePhoto, file, filename, filesize, data, id, id, qsl("jpg"), peerId, photo, photoThumbs, MTP_documentEmpty(MTP_long(0)), jpeg, false, false, 0);
connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&, const MTPInputFile&)), App::app(), SLOT(photoUpdated(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection);
connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&,bool,const MTPInputFile&)), App::app(), SLOT(photoUpdated(const FullMsgId&,bool,const MTPInputFile&)), Qt::UniqueConnection);
FullMsgId newId(peerToChannel(peerId), clientMsgId());
App::app()->regPhotoUpdate(peerId, newId);