mirror of https://github.com/procxx/kepka.git
new channel blank photos, 0.8.58.dev version
This commit is contained in:
parent
b3cb6fc317
commit
7a74c5a311
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -2946,7 +2946,7 @@ namespace Local {
|
|||
channel->input = MTP_inputPeerChannel(MTP_int(peerToChannel(channel->id)), MTP_long(access));
|
||||
channel->inputChannel = MTP_inputChannel(MTP_int(peerToChannel(channel->id)), MTP_long(access));
|
||||
|
||||
channel->photo = photoLoc.isNull() ? ImagePtr(chatDefPhoto(channel->colorIndex)) : ImagePtr(photoLoc);
|
||||
channel->photo = photoLoc.isNull() ? ImagePtr(channelDefPhoto(channel->colorIndex)) : ImagePtr(photoLoc);
|
||||
}
|
||||
App::markPeerUpdated(result);
|
||||
emit App::main()->peerPhotoChanged(result);
|
||||
|
|
|
@ -82,6 +82,16 @@ ImagePtr chatDefPhoto(int32 index) {
|
|||
return chatDefPhotos[index];
|
||||
}
|
||||
|
||||
ImagePtr channelDefPhoto(int32 index) {
|
||||
static const ImagePtr channelDefPhotos[4] = {
|
||||
ImagePtr(qsl(":/ava/art/channelcolor1.png"), "PNG"),
|
||||
ImagePtr(qsl(":/ava/art/channelcolor2.png"), "PNG"),
|
||||
ImagePtr(qsl(":/ava/art/channelcolor3.png"), "PNG"),
|
||||
ImagePtr(qsl(":/ava/art/channelcolor4.png"), "PNG"),
|
||||
};
|
||||
return channelDefPhotos[index];
|
||||
}
|
||||
|
||||
NotifySettings globalNotifyAll, globalNotifyUsers, globalNotifyChats;
|
||||
NotifySettingsPtr globalNotifyAllPtr = UnknownNotifySettings, globalNotifyUsersPtr = UnknownNotifySettings, globalNotifyChatsPtr = UnknownNotifySettings;
|
||||
|
||||
|
@ -89,7 +99,7 @@ PeerData::PeerData(const PeerId &id) : id(id), lnk(new PeerLink(this))
|
|||
, loaded(false)
|
||||
, colorIndex(peerColorIndex(id))
|
||||
, color(peerColor(colorIndex))
|
||||
, photo((isChat() || isChannel()) ? chatDefPhoto(colorIndex) : userDefPhoto(colorIndex))
|
||||
, photo(isChat() ? chatDefPhoto(colorIndex) : (isChannel() ? channelDefPhoto(colorIndex) : userDefPhoto(colorIndex)))
|
||||
, photoId(UnknownPeerPhotoId)
|
||||
, nameVersion(0)
|
||||
, notify(UnknownNotifySettings)
|
||||
|
@ -351,13 +361,13 @@ void ChannelData::setPhoto(const MTPChatPhoto &p, const PhotoId &phId) { // see
|
|||
newPhotoId = phId;
|
||||
}
|
||||
newPhotoLoc = App::imageLocation(160, 160, d.vphoto_small);
|
||||
newPhoto = newPhotoLoc.isNull() ? chatDefPhoto(colorIndex) : ImagePtr(newPhotoLoc);
|
||||
// photoFull = ImagePtr(640, 640, d.vphoto_big, chatDefPhoto(colorIndex));
|
||||
newPhoto = newPhotoLoc.isNull() ? channelDefPhoto(colorIndex) : ImagePtr(newPhotoLoc);
|
||||
// photoFull = ImagePtr(640, 640, d.vphoto_big, channelDefPhoto(colorIndex));
|
||||
} break;
|
||||
default: {
|
||||
newPhotoId = 0;
|
||||
newPhotoLoc = StorageImageLocation();
|
||||
newPhoto = chatDefPhoto(colorIndex);
|
||||
newPhoto = channelDefPhoto(colorIndex);
|
||||
// photoFull = ImagePtr();
|
||||
} break;
|
||||
}
|
||||
|
|
|
@ -173,6 +173,7 @@ inline bool isNotifyMuted(NotifySettingsPtr settings, int32 *changeIn = 0) {
|
|||
style::color peerColor(int32 index);
|
||||
ImagePtr userDefPhoto(int32 index);
|
||||
ImagePtr chatDefPhoto(int32 index);
|
||||
ImagePtr channelDefPhoto(int32 index);
|
||||
|
||||
static const PhotoId UnknownPeerPhotoId = 0xFFFFFFFFFFFFFFFFULL;
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
<file>art/chatcolor2.png</file>
|
||||
<file>art/chatcolor3.png</file>
|
||||
<file>art/chatcolor4.png</file>
|
||||
<file>art/channelcolor1.png</file>
|
||||
<file>art/channelcolor2.png</file>
|
||||
<file>art/channelcolor3.png</file>
|
||||
<file>art/channelcolor4.png</file>
|
||||
<file>art/usercolor1.png</file>
|
||||
<file>art/usercolor2.png</file>
|
||||
<file>art/usercolor3.png</file>
|
||||
|
|
Loading…
Reference in New Issue