mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
group > megagroup convert added
This commit is contained in:
@@ -102,7 +102,7 @@ PeerData::PeerData(const PeerId &id) : id(id), lnk(new PeerLink(this))
|
||||
, loaded(false)
|
||||
, colorIndex(peerColorIndex(id))
|
||||
, color(peerColor(colorIndex))
|
||||
, photo(isChat() ? chatDefPhoto(colorIndex) : (isChannel() ? channelDefPhoto(colorIndex) : userDefPhoto(colorIndex)))
|
||||
, photo((isChat() || isMegagroup()) ? chatDefPhoto(colorIndex) : (isChannel() ? channelDefPhoto(colorIndex) : userDefPhoto(colorIndex)))
|
||||
, photoId(UnknownPeerPhotoId)
|
||||
, nameVersion(0)
|
||||
, notify(UnknownNotifySettings)
|
||||
@@ -374,13 +374,13 @@ void ChannelData::setPhoto(const MTPChatPhoto &p, const PhotoId &phId) { // see
|
||||
newPhotoId = phId;
|
||||
}
|
||||
newPhotoLoc = App::imageLocation(160, 160, d.vphoto_small);
|
||||
newPhoto = newPhotoLoc.isNull() ? channelDefPhoto(colorIndex) : ImagePtr(newPhotoLoc);
|
||||
// photoFull = ImagePtr(640, 640, d.vphoto_big, channelDefPhoto(colorIndex));
|
||||
newPhoto = newPhotoLoc.isNull() ? (isMegagroup() ? chatDefPhoto(colorIndex) : channelDefPhoto(colorIndex)) : ImagePtr(newPhotoLoc);
|
||||
// photoFull = ImagePtr(640, 640, d.vphoto_big, (isMegagroup() ? chatDefPhoto(colorIndex) : channelDefPhoto(colorIndex)));
|
||||
} break;
|
||||
default: {
|
||||
newPhotoId = 0;
|
||||
newPhotoLoc = StorageImageLocation();
|
||||
newPhoto = channelDefPhoto(colorIndex);
|
||||
newPhoto = (isMegagroup() ? chatDefPhoto(colorIndex) : channelDefPhoto(colorIndex));
|
||||
// photoFull = ImagePtr();
|
||||
} break;
|
||||
}
|
||||
@@ -411,6 +411,10 @@ void ChannelData::fullUpdated() {
|
||||
_lastFullUpdate = getms(true);
|
||||
}
|
||||
|
||||
ChannelData::~ChannelData() {
|
||||
delete mgInfo;
|
||||
}
|
||||
|
||||
uint64 PtsWaiter::ptsKey(PtsSkippedQueue queue) {
|
||||
return _queue.insert(uint64(uint32(_last)) << 32 | uint64(uint32(_count)), queue).key();
|
||||
}
|
||||
|
Reference in New Issue
Block a user