Gray out names of users with non-unread stories.

This commit is contained in:
John Preston 2023-07-20 19:17:46 +04:00
parent 7e18ecfb78
commit da5bce00d4
1 changed files with 5 additions and 2 deletions

View File

@ -568,14 +568,17 @@ void List::validateSegments(
}
void List::validateName(not_null<Item*> item) {
const auto &color = st::dialogsNameFg;
const auto &element = item->element;
const auto &color = (element.unreadCount || element.skipSmall)
? st::dialogsNameFg
: st::windowSubTextFg;
if (!item->nameCache.isNull() && item->nameCacheColor == color->c) {
return;
}
const auto &full = _st.full;
const auto &font = full.nameStyle.font;
const auto available = AvailableNameWidth(_st);
const auto text = Ui::Text::String(full.nameStyle, item->element.name);
const auto text = Ui::Text::String(full.nameStyle, element.name);
const auto ratio = style::DevicePixelRatio();
item->nameCacheColor = color->c;
item->nameCache = QImage(