mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Improve unread reactions list consistency.
This commit is contained in:
@@ -679,14 +679,13 @@ bool MessageReactions::empty() const {
|
||||
return _list.empty();
|
||||
}
|
||||
|
||||
QString MessageReactions::findUnread() const {
|
||||
bool MessageReactions::hasUnread() const {
|
||||
for (auto &[emoji, list] : _recent) {
|
||||
const auto i = ranges::find(list, true, &RecentReaction::unread);
|
||||
if (i != end(list)) {
|
||||
return emoji;
|
||||
if (ranges::contains(list, true, &RecentReaction::unread)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
return false;
|
||||
}
|
||||
|
||||
void MessageReactions::markRead() {
|
||||
|
@@ -163,7 +163,7 @@ public:
|
||||
[[nodiscard]] QString chosen() const;
|
||||
[[nodiscard]] bool empty() const;
|
||||
|
||||
[[nodiscard]] QString findUnread() const;
|
||||
[[nodiscard]] bool hasUnread() const;
|
||||
void markRead();
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user