mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-08 08:04:08 +02:00
Always show unread mentions / reactions buttons.
This commit is contained in:
parent
b7a70a2f28
commit
315c85fb8d
1 changed files with 3 additions and 17 deletions
|
@ -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)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue