2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

forward/delete for channels, prepared load unread by offset_id, not done yet!

This commit is contained in:
John Preston
2015-09-07 10:52:37 +03:00
parent b53e35e046
commit 54d5b6dd71
14 changed files with 205 additions and 107 deletions

View File

@@ -222,7 +222,7 @@ struct History : public QList<HistoryBlock*> {
int32 geomResize(int32 newWidth, int32 *ytransform = 0, bool dontRecountText = false); // return new size
int32 width, height, msgCount, unreadCount;
int32 inboxReadTill, outboxReadTill;
int32 inboxReadBefore, outboxReadBefore;
HistoryItem *showFrom;
HistoryUnreadBar *unreadBar;
@@ -705,14 +705,14 @@ public:
return _flags & MTPDmessage_flag_out;
}
bool unread() const {
if ((out() && (id > 0 && id <= _history->outboxReadTill)) || (!out() && id > 0 && id <= _history->inboxReadTill)) return false;
if ((out() && (id > 0 && id < _history->outboxReadBefore)) || (!out() && id > 0 && id < _history->inboxReadBefore)) return false;
return _flags & MTPDmessage_flag_unread;
}
bool notifyByFrom() const {
return _flags & MTPDmessage_flag_notify_by_from;
}
bool isMediaUnread() const {
return _flags & MTPDmessage_flag_media_unread;
return (_flags & MTPDmessage_flag_media_unread) && (channelId() == NoChannel); // CHANNELS_UI
}
void markMediaRead() {
_flags &= ~MTPDmessage_flag_media_unread;