Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev
This commit is contained in:
commit
196b643e7d
|
@ -5096,8 +5096,9 @@ void HistoryReply::drawReplyTo(QPainter &p, int32 x, int32 y, int32 w, bool sele
|
|||
}
|
||||
replyToName.drawElided(p, x + st::msgReplyBarSkip + previewSkip, y + st::msgReplyPadding.top(), w - st::msgReplyBarSkip - previewSkip);
|
||||
|
||||
HistoryMessage *replyToAsMsg = replyToMsg->toHistoryMessage();
|
||||
if (likeService) {
|
||||
} else if (replyToMsg->getMedia() || replyToMsg->serviceMsg()) {
|
||||
} else if ((replyToAsMsg && replyToAsMsg->justMedia()) || replyToMsg->serviceMsg()) {
|
||||
style::color date(selected ? (out() ? st::msgOutSelectDateColor : st::msgInSelectDateColor) : (out() ? st::msgOutDateColor : st::msgInDateColor));
|
||||
p.setPen(date->p);
|
||||
} else {
|
||||
|
|
|
@ -620,6 +620,7 @@ private:
|
|||
ItemAnimations &itemAnimations();
|
||||
|
||||
class HistoryReply; // dynamic_cast optimize
|
||||
class HistoryMessage; // dynamic_cast optimize
|
||||
|
||||
class HistoryMedia;
|
||||
class HistoryItem : public HistoryElem {
|
||||
|
@ -735,6 +736,12 @@ public:
|
|||
virtual const HistoryReply *toHistoryReply() const { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
virtual HistoryMessage *toHistoryMessage() { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
virtual const HistoryMessage *toHistoryMessage() const { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual ~HistoryItem();
|
||||
|
||||
|
@ -1244,6 +1251,13 @@ public:
|
|||
return from();
|
||||
}
|
||||
|
||||
HistoryMessage *toHistoryMessage() { // dynamic_cast optimize
|
||||
return this;
|
||||
}
|
||||
const HistoryMessage *toHistoryMessage() const { // dynamic_cast optimize
|
||||
return this;
|
||||
}
|
||||
|
||||
~HistoryMessage();
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue