mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-18 08:39:30 +00:00
Returned display of message status for self and last messages.
This commit is contained in:
parent
a0584ea7a1
commit
4e345ac688
@ -280,6 +280,16 @@ bool Element::isUnderCursor() const {
|
||||
return _delegate->elementUnderCursor(this);
|
||||
}
|
||||
|
||||
bool Element::isLastAndSelfMessage() const {
|
||||
if (!hasOutLayout()) {
|
||||
return false;
|
||||
}
|
||||
if (const auto last = data()->_history->lastMessage()) {
|
||||
return last == data();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Element::setPendingResize() {
|
||||
_flags |= Flag::NeedsResize;
|
||||
if (_context == Context::History) {
|
||||
|
@ -158,6 +158,8 @@ public:
|
||||
bool pendingResize() const;
|
||||
bool isUnderCursor() const;
|
||||
|
||||
bool isLastAndSelfMessage() const;
|
||||
|
||||
bool isAttachedToPrevious() const;
|
||||
bool isAttachedToNext() const;
|
||||
|
||||
|
@ -1444,7 +1444,8 @@ bool Gif::dataLoaded() const {
|
||||
bool Gif::needInfoDisplay() const {
|
||||
return _parent->data()->isSending()
|
||||
|| _data->uploading()
|
||||
|| _parent->isUnderCursor();
|
||||
|| _parent->isUnderCursor()
|
||||
|| _parent->isLastAndSelfMessage();
|
||||
}
|
||||
|
||||
bool Gif::needCornerStatusDisplay() const {
|
||||
|
@ -453,7 +453,9 @@ bool GroupedMedia::computeNeedBubble() const {
|
||||
}
|
||||
|
||||
bool GroupedMedia::needInfoDisplay() const {
|
||||
return (_parent->data()->id < 0 || _parent->isUnderCursor());
|
||||
return (_parent->data()->id < 0
|
||||
|| _parent->isUnderCursor()
|
||||
|| _parent->isLastAndSelfMessage());
|
||||
}
|
||||
|
||||
} // namespace HistoryView
|
||||
|
@ -367,6 +367,7 @@ bool UnwrappedMedia::needInfoDisplay() const {
|
||||
return (_parent->data()->id < 0)
|
||||
|| (_parent->isUnderCursor())
|
||||
|| (_parent->displayRightAction())
|
||||
|| (_parent->isLastAndSelfMessage())
|
||||
|| (_parent->hasOutLayout()
|
||||
&& !Adaptive::ChatWide()
|
||||
&& _content->alwaysShowOutTimestamp());
|
||||
|
@ -480,7 +480,9 @@ bool Photo::dataLoaded() const {
|
||||
}
|
||||
|
||||
bool Photo::needInfoDisplay() const {
|
||||
return (_parent->data()->id < 0 || _parent->isUnderCursor());
|
||||
return (_parent->data()->id < 0
|
||||
|| _parent->isUnderCursor()
|
||||
|| _parent->isLastAndSelfMessage());
|
||||
}
|
||||
|
||||
void Photo::validateGroupedCache(
|
||||
|
Loading…
Reference in New Issue
Block a user