mirror of https://github.com/procxx/kepka.git
Fixed drawing of self userpic.
This commit is contained in:
parent
a80f7c53ea
commit
60cf1b6490
|
@ -175,9 +175,13 @@ auto lifetime = rpl::lifetime();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (bool) isSelfPeer {
|
||||||
|
return !self.peer ? false : self.peer->id == Auth().userPeerId();
|
||||||
|
}
|
||||||
|
|
||||||
- (NSImage *) getPinImage {
|
- (NSImage *) getPinImage {
|
||||||
if (self.number <= kSavedMessagesId) {
|
// Don't draw self userpic if we pin Saved Messages.
|
||||||
|
if (self.number <= kSavedMessagesId || [self isSelfPeer]) {
|
||||||
const int s = kIdealIconSize * cRetinaFactor();
|
const int s = kIdealIconSize * cRetinaFactor();
|
||||||
auto *pix = new QPixmap(s, s);
|
auto *pix = new QPixmap(s, s);
|
||||||
Painter paint(pix);
|
Painter paint(pix);
|
||||||
|
|
Loading…
Reference in New Issue