2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

moved to 40 layer

This commit is contained in:
John Preston
2015-10-28 20:16:52 -04:00
parent 3edc46320d
commit 4b8a33de1c
31 changed files with 1021 additions and 474 deletions

View File

@@ -780,7 +780,7 @@ enum InfoDisplayType {
};
inline bool isImportantChannelMessage(MsgId id, int32 flags) { // client-side important msgs always has_views or has_from_id
return (flags & MTPDmessage_flag_out) || (flags & MTPDmessage_flag_notify_by_from) || ((id > 0 || flags != 0) && !(flags & MTPDmessage::flag_from_id));
return (flags & MTPDmessage::flag_out) || (flags & MTPDmessage::flag_mentioned) || ((id > 0 || flags != 0) && !(flags & MTPDmessage::flag_from_id));
}
enum HistoryItemType {
@@ -827,20 +827,20 @@ public:
_block = block;
}
bool out() const {
return _flags & MTPDmessage_flag_out;
return _flags & MTPDmessage::flag_out;
}
bool unread() const {
if ((out() && (id > 0 && id < _history->outboxReadBefore)) || (!out() && id > 0 && id < _history->inboxReadBefore)) return false;
return (id > 0 && !out() && channelId() != NoChannel) ? true : (history()->peer->isSelf() ? false : (_flags & MTPDmessage_flag_unread));
return (id > 0 && !out() && channelId() != NoChannel) ? true : (history()->peer->isSelf() ? false : (_flags & MTPDmessage::flag_unread));
}
bool notifyByFrom() const {
return _flags & MTPDmessage_flag_notify_by_from;
bool mentionsMe() const {
return _flags & MTPDmessage::flag_mentioned;
}
bool isMediaUnread() const {
return (_flags & MTPDmessage_flag_media_unread) && (channelId() == NoChannel);
return (_flags & MTPDmessage::flag_media_unread) && (channelId() == NoChannel);
}
void markMediaRead() {
_flags &= ~MTPDmessage_flag_media_unread;
_flags &= ~MTPDmessage::flag_media_unread;
}
bool hasReplyMarkup() const {
return _flags & MTPDmessage::flag_reply_markup;