From f2824f79f635a2254ae33a087bc7d5b615caa71f Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 5 Jan 2016 14:11:18 +0800 Subject: [PATCH] improved forwarded media display, 0.9.18 --- Telegram/SourceFiles/history.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 063e4bf42b..d192044d7b 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -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() {