mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-22 19:34:27 +00:00
Fixed covering message status with mentions button at end.
This commit is contained in:
parent
ff4ccdc59c
commit
4102551108
@ -2738,6 +2738,7 @@ void HistoryWidget::preloadHistoryIfNeeded() {
|
||||
}
|
||||
|
||||
updateHistoryDownVisibility();
|
||||
updateUnreadMentionsVisibility();
|
||||
if (!_scrollToAnimation.animating()) {
|
||||
preloadHistoryByScroll();
|
||||
checkReplyReturns();
|
||||
@ -5402,13 +5403,24 @@ void HistoryWidget::updateUnreadMentionsVisibility() {
|
||||
if (showUnreadMentions) {
|
||||
session().api().preloadEnoughUnreadMentions(_history);
|
||||
}
|
||||
auto unreadMentionsIsVisible = [this, showUnreadMentions] {
|
||||
const auto unreadMentionsIsShown = [&] {
|
||||
if (!showUnreadMentions || _firstLoadRequest) {
|
||||
return false;
|
||||
}
|
||||
return (_history->getUnreadMentionsLoadedCount() > 0);
|
||||
};
|
||||
auto unreadMentionsIsShown = unreadMentionsIsVisible();
|
||||
if (!_history->getUnreadMentionsLoadedCount()) {
|
||||
return false;
|
||||
}
|
||||
// If we have an unheard voice message with the mention
|
||||
// and our message is the last one, we can't see the status
|
||||
// (delivered/read) of this message.
|
||||
// (Except for MacBooks with the TouchPad.)
|
||||
if (_scroll->scrollTop() == _scroll->scrollTopMax()) {
|
||||
if (const auto lastMessage = _history->lastMessage()) {
|
||||
return !lastMessage->from()->isSelf();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
if (unreadMentionsIsShown) {
|
||||
_unreadMentions->setUnreadCount(_history->getUnreadMentionsCount());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user