Fix unread mark badge in new forums layout.

This commit is contained in:
John Preston 2025-06-04 18:13:21 +04:00
parent 8d1c2f832d
commit 910b6d8879

View file

@ -635,7 +635,7 @@ void SubsectionTabs::refreshSlice() {
const auto push = [&](not_null<Data::Thread*> thread) { const auto push = [&](not_null<Data::Thread*> thread) {
const auto topic = thread->asTopic(); const auto topic = thread->asTopic();
const auto sublist = thread->asSublist(); const auto sublist = thread->asSublist();
const auto badges = [&] { auto badges = [&] {
if (!topic && !sublist) { if (!topic && !sublist) {
return Dialogs::BadgesState(); return Dialogs::BadgesState();
} else if (thread->chatListUnreadState().known) { } else if (thread->chatListUnreadState().known) {
@ -650,6 +650,10 @@ void SubsectionTabs::refreshSlice() {
} }
return thread->chatListBadgesState(); return thread->chatListBadgesState();
}(); }();
if (topic) {
// Don't show the small indicators for non-visited unread topics.
badges.unread = false;
}
slice.push_back({ slice.push_back({
.thread = thread, .thread = thread,
.badges = badges, .badges = badges,