Added QDebug operator support for Data::UnreadState.

This commit is contained in:
23rd
2025-09-08 22:02:28 +03:00
parent 2b7e8bf449
commit 15019051c0

View File

@@ -81,6 +81,21 @@ inline UnreadState operator-(const UnreadState &a, const UnreadState &b) {
return result;
}
#ifdef _DEBUG
inline QDebug operator<<(QDebug debug, const UnreadState &state) {
return debug.nospace() << "UnreadState(messages:" << state.messages
<< ", messagesMuted:" << state.messagesMuted
<< ", chats:" << state.chats
<< ", chatsMuted:" << state.chatsMuted
<< ", marks:" << state.marks
<< ", marksMuted:" << state.marksMuted
<< ", reactions:" << state.reactions
<< ", reactionsMuted:" << state.reactionsMuted
<< ", mentions:" << state.mentions
<< ", known:" << state.known << ")";
}
#endif // _DEBUG
struct BadgesState {
int unreadCounter = 0;
bool unread : 1 = false;