2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35: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

@@ -86,21 +86,15 @@ void Entry::cachePinnedIndex(FilterId filterId, int index) {
}
}
void Entry::cacheTopPromoted(
bool promoted,
const QString &type,
const QString &message) {
if (_isTopPromoted != promoted
|| _topPromotedType != type
|| _topPromotedMessage != message) {
_isTopPromoted = promoted;
_topPromotedType = type;
_topPromotedMessage = message;
updateChatListSortPosition();
updateChatListEntry();
if (!_isTopPromoted) {
updateChatListExistence();
}
void Entry::cacheTopPromoted(bool promoted) {
if (_isTopPromoted == promoted) {
return;
}
_isTopPromoted = promoted;
updateChatListSortPosition();
updateChatListEntry();
if (!_isTopPromoted) {
updateChatListExistence();
}
}
@@ -108,14 +102,6 @@ bool Entry::isTopPromoted() const {
return _isTopPromoted;
}
QString Entry::topPromotionType() const {
return _topPromotedType;
}
QString Entry::topPromotionMessage() const {
return _topPromotedMessage;
}
bool Entry::needUpdateInChatList() const {
return inChatList() || shouldBeInChatList();
}