Skip to content

Commit

Permalink
improved forwarded media display, 0.9.18
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 5, 2016
1 parent 2c7fb82 commit f2824f7
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Telegram/SourceFiles/history.h
Original file line number Diff line number Diff line change
Expand Up @@ -1323,17 +1323,14 @@ class HistoryPhoto : public HistoryFileMedia {
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();
}
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}

protected:

Expand Down Expand Up @@ -1392,17 +1389,14 @@ class HistoryVideo : public HistoryFileMedia {
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();
}
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}

protected:

Expand Down Expand Up @@ -1628,17 +1622,14 @@ class HistoryGif : public HistoryFileMedia {
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();
}
bool hideFromName() const {
return true;
}
bool hideForwardedFrom() const {
return true;
}

~HistoryGif();

Expand Down Expand Up @@ -2165,7 +2156,7 @@ class HistoryForwarded : public HistoryMessage {
}
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() {
Expand Down

0 comments on commit f2824f7

Please sign in to comment.