2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Support psa_message in chats list.

This commit is contained in:
John Preston
2020-04-29 12:46:02 +04:00
parent aabc8173c3
commit 042ed8f54a
6 changed files with 59 additions and 35 deletions

View File

@@ -325,7 +325,18 @@ void paintRow(
auto texttop = st::dialogsPadding.y()
+ st::msgNameFont->height
+ st::dialogsSkip;
if (draft
if (promoted && !history->topPromotionMessage().isEmpty()) {
auto availableWidth = namewidth;
p.setFont(st::dialogsTextFont);
if (history->cloudDraftTextCache.isEmpty()) {
history->cloudDraftTextCache.setText(
st::dialogsTextStyle,
history->topPromotionMessage(),
Ui::DialogTextOptions());
}
p.setPen(active ? st::dialogsTextFgActive : (selected ? st::dialogsTextFgOver : st::dialogsTextFg));
history->cloudDraftTextCache.drawElided(p, nameleft, texttop, availableWidth, 1);
} else if (draft
|| (supportMode
&& Auth().supportHelper().isOccupiedBySomeone(history))) {
if (!promoted) {