mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix userpics display for min-loaded users.
This commit is contained in:
parent
4c1213ce9e
commit
1a40f2b3ef
6 changed files with 18 additions and 5 deletions
|
@ -396,7 +396,7 @@ public:
|
|||
// Still public data members.
|
||||
uint64 access = 0;
|
||||
|
||||
MTPinputChannel inputChannel;
|
||||
MTPinputChannel inputChannel = MTP_inputChannelEmpty();
|
||||
|
||||
QString username;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ public:
|
|||
void setMigrateToChannel(ChannelData *channel);
|
||||
|
||||
// Still public data members.
|
||||
MTPint inputChat;
|
||||
const MTPint inputChat;
|
||||
|
||||
int count = 0;
|
||||
TimeId date = 0;
|
||||
|
|
|
@ -388,7 +388,7 @@ public:
|
|||
|
||||
const PeerId id;
|
||||
QString name;
|
||||
MTPinputPeer input;
|
||||
MTPinputPeer input = MTP_inputPeerEmpty();
|
||||
|
||||
int nameVersion = 1;
|
||||
|
||||
|
|
|
@ -398,6 +398,16 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
|
|||
//| MTPDuser_ClientFlag::f_inaccessible
|
||||
| MTPDuser::Flag::f_deleted;
|
||||
result->setFlags((result->flags() & ~mask) | (data.vflags().v & mask));
|
||||
if (result->input.type() == mtpc_inputPeerEmpty) {
|
||||
result->input = MTP_inputPeerUser(
|
||||
data.vid(),
|
||||
MTP_long(data.vaccess_hash().value_or_empty()));
|
||||
}
|
||||
if (result->inputUser.type() == mtpc_inputUserEmpty) {
|
||||
result->inputUser = MTP_inputUser(
|
||||
data.vid(),
|
||||
MTP_long(data.vaccess_hash().value_or_empty()));
|
||||
}
|
||||
} else {
|
||||
result->setFlags(data.vflags().v);
|
||||
if (data.is_self()) {
|
||||
|
@ -643,6 +653,10 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
|
|||
| MTPDchannel::Flag::f_megagroup
|
||||
| MTPDchannel_ClientFlag::f_forbidden;
|
||||
channel->setFlags((channel->flags() & ~mask) | (data.vflags().v & mask));
|
||||
if (channel->input.type() == mtpc_inputPeerEmpty
|
||||
|| channel->inputChannel.type() == mtpc_inputChannelEmpty) {
|
||||
channel->setAccessHash(data.vaccess_hash().value_or_empty());
|
||||
}
|
||||
} else {
|
||||
if (const auto rights = data.vadmin_rights()) {
|
||||
channel->setAdminRights(*rights);
|
||||
|
|
|
@ -155,7 +155,7 @@ public:
|
|||
return !_phone.isEmpty();
|
||||
}
|
||||
|
||||
MTPInputUser inputUser;
|
||||
MTPInputUser inputUser = MTP_inputUserEmpty();
|
||||
|
||||
QString firstName;
|
||||
QString lastName;
|
||||
|
|
|
@ -283,7 +283,6 @@ PeerData *readPeer(
|
|||
chat->setInviteLink(inviteLink);
|
||||
|
||||
chat->input = MTP_inputPeerChat(MTP_int(peerToChat(chat->id)));
|
||||
chat->inputChat = MTP_int(peerToChat(chat->id));
|
||||
}
|
||||
} else if (const auto channel = result->asChannel()) {
|
||||
QString name, inviteLink;
|
||||
|
|
Loading…
Add table
Reference in a new issue