improved forwarded media display, 0.9.18

This commit is contained in:
John Preston 2016-01-05 14:11:18 +08:00
parent 2c7fb82708
commit f2824f79f6
1 changed files with 4 additions and 13 deletions

View File

@ -1323,7 +1323,7 @@ public:
return _caption.original();
}
bool needsBubble(const HistoryItem *parent) const {
return !_caption.isEmpty() || parent->toHistoryReply() || parent->viaBot();
return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot();
}
bool customInfoLayout() const {
return _caption.isEmpty();
@ -1331,9 +1331,6 @@ public:
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}
protected:
@ -1392,7 +1389,7 @@ public:
ImagePtr replyPreview();
bool needsBubble(const HistoryItem *parent) const {
return !_caption.isEmpty() || parent->toHistoryReply() || parent->viaBot();
return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot();
}
bool customInfoLayout() const {
return _caption.isEmpty();
@ -1400,9 +1397,6 @@ public:
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}
protected:
@ -1628,7 +1622,7 @@ public:
return _caption.original();
}
bool needsBubble(const HistoryItem *parent) const {
return !_caption.isEmpty() || parent->toHistoryReply() || parent->viaBot();
return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot();
}
bool customInfoLayout() const {
return _caption.isEmpty();
@ -1636,9 +1630,6 @@ public:
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}
~HistoryGif();
@ -2165,7 +2156,7 @@ public:
}
QString selectedText(uint32 selection) const;
bool displayForwardedFrom() const {
return via() || !_media || !_media->isDisplayed() || !_media->hideForwardedFrom();
return via() || !_media || !_media->isDisplayed() || (fwdFrom->isChannel() || !_media->hideForwardedFrom());
}
HistoryForwarded *toHistoryForwarded() {