mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fixed display tags with NoRead flag while history has fake unread state.
This commit is contained in:
@@ -283,7 +283,9 @@ const base::flat_set<not_null<History*>> &ChatFilter::never() const {
|
||||
return _never;
|
||||
}
|
||||
|
||||
bool ChatFilter::contains(not_null<History*> history) const {
|
||||
bool ChatFilter::contains(
|
||||
not_null<History*> history,
|
||||
bool ignoreFakeUnread) const {
|
||||
const auto flag = [&] {
|
||||
const auto peer = history->peer;
|
||||
if (const auto user = peer->asUser()) {
|
||||
@@ -320,7 +322,7 @@ bool ChatFilter::contains(not_null<History*> history) const {
|
||||
&& (!(_flags & Flag::NoRead)
|
||||
|| state.unread
|
||||
|| state.mention
|
||||
|| history->fakeUnreadWhileOpened())
|
||||
|| (!ignoreFakeUnread && history->fakeUnreadWhileOpened()))
|
||||
&& (!(_flags & Flag::NoArchived)
|
||||
|| (history->folderKnown() && !history->folder())))
|
||||
|| _always.contains(history);
|
||||
|
@@ -81,7 +81,9 @@ public:
|
||||
[[nodiscard]] const std::vector<not_null<History*>> &pinned() const;
|
||||
[[nodiscard]] const base::flat_set<not_null<History*>> &never() const;
|
||||
|
||||
[[nodiscard]] bool contains(not_null<History*> history) const;
|
||||
[[nodiscard]] bool contains(
|
||||
not_null<History*> history,
|
||||
bool ignoreFakeUnread = false) const;
|
||||
|
||||
private:
|
||||
FilterId _id = 0;
|
||||
|
Reference in New Issue
Block a user