mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Gray out names of users with non-unread stories.
This commit is contained in:
parent
7e18ecfb78
commit
da5bce00d4
1 changed files with 5 additions and 2 deletions
|
@ -568,14 +568,17 @@ void List::validateSegments(
|
||||||
}
|
}
|
||||||
|
|
||||||
void List::validateName(not_null<Item*> item) {
|
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) {
|
if (!item->nameCache.isNull() && item->nameCacheColor == color->c) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto &full = _st.full;
|
const auto &full = _st.full;
|
||||||
const auto &font = full.nameStyle.font;
|
const auto &font = full.nameStyle.font;
|
||||||
const auto available = AvailableNameWidth(_st);
|
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();
|
const auto ratio = style::DevicePixelRatio();
|
||||||
item->nameCacheColor = color->c;
|
item->nameCacheColor = color->c;
|
||||||
item->nameCache = QImage(
|
item->nameCache = QImage(
|
||||||
|
|
Loading…
Add table
Reference in a new issue