2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -2718,6 +2718,29 @@ void History::dialogEntryApplied() {
}
}
void History::cacheTopPromotion(
bool promoted,
const QString &type,
const QString &message) {
const auto changed = (isTopPromoted() != promoted);
cacheTopPromoted(promoted);
if (_topPromotedType != type || _topPromotedMessage != message) {
_topPromotedType = type;
_topPromotedMessage = message;
cloudDraftTextCache.clear();
} else if (changed) {
cloudDraftTextCache.clear();
}
}
QString History::topPromotionType() const {
return _topPromotedType;
}
QString History::topPromotionMessage() const {
return _topPromotedMessage;
}
bool History::clearUnreadOnClientSide() const {
if (!session().supportMode()) {
return false;