Always show unread mentions / reactions buttons.

This commit is contained in:
John Preston 2022-01-31 18:44:05 +03:00
parent b7a70a2f28
commit 315c85fb8d

View file

@ -5659,23 +5659,9 @@ void HistoryWidget::updateUnreadThingsVisibility() {
unreadThings.preloadEnough(_history); unreadThings.preloadEnough(_history);
const auto updateWithLoadedCount = [&](CornerButton &button, int count) { const auto updateWithLoadedCount = [&](CornerButton &button, int count) {
updateCornerButtonVisibility(button, [&] { updateCornerButtonVisibility(button, (count > 0)
if (!count && !_firstLoadRequest
|| _firstLoadRequest && !_voiceRecordBar->isLockPresent());
|| _voiceRecordBar->isLockPresent()) {
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 (unreadThings.trackMentions(_peer)) { if (unreadThings.trackMentions(_peer)) {
if (const auto count = _history->unreadMentions().count(0)) { if (const auto count = _history->unreadMentions().count(0)) {