mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 17:51:41 -05:00
Always display name in media messages in groups.
This commit is contained in:
parent
3c18532612
commit
2becd307df
3 changed files with 13 additions and 26 deletions
|
@ -145,9 +145,6 @@ public:
|
|||
virtual QMargins bubbleMargins() const {
|
||||
return QMargins();
|
||||
}
|
||||
virtual bool hideFromName() const {
|
||||
return false;
|
||||
}
|
||||
virtual bool hideForwardedFrom() const {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -161,17 +161,14 @@ public:
|
|||
if (!_caption.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (_parent->viaBot()) {
|
||||
return true;
|
||||
if (auto message = _parent->toHistoryMessage()) {
|
||||
return message->displayFromName();
|
||||
}
|
||||
return (_parent->Has<HistoryMessageForwarded>() || _parent->Has<HistoryMessageReply>());
|
||||
return false;
|
||||
}
|
||||
bool customInfoLayout() const override {
|
||||
return _caption.isEmpty();
|
||||
}
|
||||
bool hideFromName() const override {
|
||||
return true;
|
||||
}
|
||||
bool skipBubbleTail() const override {
|
||||
return isBubbleBottom() && _caption.isEmpty();
|
||||
}
|
||||
|
@ -251,17 +248,14 @@ public:
|
|||
if (!_caption.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (_parent->viaBot()) {
|
||||
return true;
|
||||
if (auto message = _parent->toHistoryMessage()) {
|
||||
return message->displayFromName();
|
||||
}
|
||||
return (_parent->Has<HistoryMessageForwarded>() || _parent->Has<HistoryMessageReply>());
|
||||
return false;
|
||||
}
|
||||
bool customInfoLayout() const override {
|
||||
return _caption.isEmpty();
|
||||
}
|
||||
bool hideFromName() const override {
|
||||
return true;
|
||||
}
|
||||
bool skipBubbleTail() const override {
|
||||
return isBubbleBottom() && _caption.isEmpty();
|
||||
}
|
||||
|
@ -480,17 +474,14 @@ public:
|
|||
if (!_caption.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (_parent->viaBot()) {
|
||||
return true;
|
||||
if (auto message = _parent->toHistoryMessage()) {
|
||||
return message->displayFromName();
|
||||
}
|
||||
return (_parent->Has<HistoryMessageForwarded>() || _parent->Has<HistoryMessageReply>());
|
||||
return false;
|
||||
}
|
||||
bool customInfoLayout() const override {
|
||||
return _caption.isEmpty();
|
||||
}
|
||||
bool hideFromName() const override {
|
||||
return true;
|
||||
}
|
||||
bool skipBubbleTail() const override {
|
||||
return isBubbleBottom() && _caption.isEmpty();
|
||||
}
|
||||
|
@ -884,10 +875,10 @@ public:
|
|||
if (!_title.isEmpty() || !_description.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (_parent->viaBot()) {
|
||||
return true;
|
||||
if (auto message = _parent->toHistoryMessage()) {
|
||||
return message->displayFromName();
|
||||
}
|
||||
return (_parent->Has<HistoryMessageForwarded>() || _parent->Has<HistoryMessageReply>());
|
||||
return false;
|
||||
}
|
||||
bool customInfoLayout() const override {
|
||||
return true;
|
||||
|
|
|
@ -60,8 +60,7 @@ public:
|
|||
bool displayFromName() const {
|
||||
if (!hasFromName()) return false;
|
||||
if (isAttachedToPrevious()) return false;
|
||||
|
||||
return (!emptyText() || !_media || !_media->isDisplayed() || Has<HistoryMessageReply>() || Has<HistoryMessageForwarded>() || viaBot() || !_media->hideFromName());
|
||||
return true;
|
||||
}
|
||||
bool displayEditedBadge(bool hasViaBotOrInlineMarkup) const;
|
||||
bool uploading() const {
|
||||
|
|
Loading…
Add table
Reference in a new issue