mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Don't try building profile photos list by updates.
This commit is contained in:
parent
d4feb16378
commit
e065d32d28
3 changed files with 14 additions and 8 deletions
|
@ -1642,15 +1642,21 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
|||
if (auto user = session().data().userLoaded(d.vuser_id().v)) {
|
||||
user->setPhoto(d.vphoto());
|
||||
user->loadUserpic();
|
||||
if (mtpIsTrue(d.vprevious()) || !user->userpicPhotoId()) {
|
||||
// After that update we don't have enough information to
|
||||
// create a 'photo' with all necessary fields. So if
|
||||
// we receive second such update we end up with a 'photo_id'
|
||||
// in user_photos list without a loaded 'photo'.
|
||||
// It fails to show in media overview if you try to open it.
|
||||
//
|
||||
//if (mtpIsTrue(d.vprevious()) || !user->userpicPhotoId()) {
|
||||
session().storage().remove(Storage::UserPhotosRemoveAfter(
|
||||
user->bareId(),
|
||||
user->userpicPhotoId()));
|
||||
} else {
|
||||
session().storage().add(Storage::UserPhotosAddNew(
|
||||
user->bareId(),
|
||||
user->userpicPhotoId()));
|
||||
}
|
||||
//} else {
|
||||
// session().storage().add(Storage::UserPhotosAddNew(
|
||||
// user->bareId(),
|
||||
// user->userpicPhotoId()));
|
||||
//}
|
||||
}
|
||||
} break;
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ protected:
|
|||
void updateUserpic(
|
||||
PhotoId photoId,
|
||||
MTP::DcId dcId,
|
||||
const MTPFileLocation &location);
|
||||
const MTPFileLocation &small);
|
||||
void clearUserpic();
|
||||
|
||||
private:
|
||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 544e699b8fd201959f442e0f931e60fb82b31f43
|
||||
Subproject commit 408083f52e1815cd2a359aa3877185d48e82d4f9
|
Loading…
Add table
Reference in a new issue