2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Track mentions / reactions together with unread.

This commit is contained in:
John Preston
2022-10-20 12:57:12 +04:00
parent 5356f6cd2c
commit 4910a60499
22 changed files with 407 additions and 478 deletions

View File

@@ -71,6 +71,8 @@ public:
[[nodiscard]] HistoryUnreadThings::ConstProxy unreadMentions() const;
[[nodiscard]] HistoryUnreadThings::Proxy unreadReactions();
[[nodiscard]] HistoryUnreadThings::ConstProxy unreadReactions() const;
virtual void hasUnreadMentionChanged(bool has) = 0;
virtual void hasUnreadReactionChanged(bool has) = 0;
void removeNotification(not_null<HistoryItem*> item);
void clearNotifications();
@@ -90,7 +92,6 @@ public:
[[nodiscard]] bool unreadMark() const {
return (_flags & Flag::UnreadMark);
}
virtual void setUnreadMark(bool unread);
[[nodiscard]] virtual bool isServerSideUnread(
not_null<const HistoryItem*> item) const = 0;
@@ -108,6 +109,9 @@ public:
[[nodiscard]] virtual auto sendActionPainter()
-> not_null<HistoryView::SendActionPainter*> = 0;
protected:
void setUnreadMarkFlag(bool unread);
private:
enum class Flag : uchar {
UnreadMark = (1 << 0),