2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Set name / phone texts on-demand.

This commit is contained in:
John Preston
2022-08-09 14:12:19 +03:00
parent ceb7d5f238
commit 8bc807dc40
98 changed files with 426 additions and 260 deletions

View File

@@ -311,6 +311,7 @@ void paintRow(
VideoUserpic *videoUserpic,
FilterId filterId,
PeerData *from,
const Ui::Text::String &fromName,
const HiddenSenderInfo *hiddenSenderInfo,
HistoryItem *item,
const Data::Draft *draft,
@@ -590,7 +591,7 @@ void paintRow(
from,
p,
rectForName,
from->nameText().maxWidth(),
fromName.maxWidth(),
fullWidth,
badgeStyle);
rectForName.setWidth(rectForName.width() - badgeWidth);
@@ -600,14 +601,14 @@ void paintRow(
: selected
? st::dialogsNameFgOver
: st::dialogsNameFg);
from->nameText().drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
fromName.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
} else if (hiddenSenderInfo) {
p.setPen(active
? st::dialogsNameFgActive
: selected
? st::dialogsNameFgOver
: st::dialogsNameFg);
hiddenSenderInfo->nameText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
hiddenSenderInfo->nameText().drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
} else {
p.setPen(active
? st::dialogsNameFgActive
@@ -958,6 +959,7 @@ void RowPainter::paint(
videoUserpic,
filterId,
from,
entry->chatListNameText(),
nullptr,
item,
cloudDraft,
@@ -1092,6 +1094,7 @@ void RowPainter::paint(
nullptr,
FilterId(),
from,
row->name(),
hiddenSenderInfo,
item,
cloudDraft,