mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
added forwarded and from names in files / audios / videos / contacts display, grouped notification for many forwarded messages, fix of getDifference() for new_session_created
This commit is contained in:
@@ -218,6 +218,9 @@ struct History : public QList<HistoryBlock*> {
|
||||
HistoryItem *currentNotification() {
|
||||
return notifies.isEmpty() ? 0 : notifies.front();
|
||||
}
|
||||
bool hasNotification() const {
|
||||
return !notifies.isEmpty();
|
||||
}
|
||||
void skipNotification() {
|
||||
if (!notifies.isEmpty()) {
|
||||
notifies.pop_front();
|
||||
@@ -621,6 +624,7 @@ ItemAnimations &itemAnimations();
|
||||
|
||||
class HistoryReply; // dynamic_cast optimize
|
||||
class HistoryMessage; // dynamic_cast optimize
|
||||
class HistoryForwarded; // dynamic_cast optimize
|
||||
|
||||
class HistoryMedia;
|
||||
class HistoryItem : public HistoryElem {
|
||||
@@ -730,18 +734,24 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual HistoryReply *toHistoryReply() { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
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 HistoryForwarded *toHistoryForwarded() { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
virtual const HistoryForwarded *toHistoryForwarded() const { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
virtual HistoryReply *toHistoryReply() { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
virtual const HistoryReply *toHistoryReply() const { // dynamic_cast optimize
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual ~HistoryItem();
|
||||
|
||||
@@ -1282,10 +1292,12 @@ public:
|
||||
void fwdNameUpdated() const;
|
||||
|
||||
void draw(QPainter &p, uint32 selection) const;
|
||||
void drawForwardedFrom(QPainter &p, int32 x, int32 y, int32 w, bool selected) const;
|
||||
void drawMessageText(QPainter &p, const QRect &trect, uint32 selection) const;
|
||||
int32 resize(int32 width, bool dontRecountText = false, const HistoryItem *parent = 0);
|
||||
bool hasPoint(int32 x, int32 y) const;
|
||||
void getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y) const;
|
||||
void getForwardedState(TextLinkPtr &lnk, bool &inText, int32 x, int32 w) const;
|
||||
void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const;
|
||||
|
||||
QDateTime dateForwarded() const {
|
||||
@@ -1296,6 +1308,13 @@ public:
|
||||
}
|
||||
QString selectedText(uint32 selection) const;
|
||||
|
||||
HistoryForwarded *toHistoryForwarded() {
|
||||
return this;
|
||||
}
|
||||
const HistoryForwarded *toHistoryForwarded() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
QDateTime fwdDate;
|
||||
|
Reference in New Issue
Block a user