ref: use UnreadTotal instead of two bool

This commit is contained in:
relikd
2025-07-21 13:14:01 +02:00
parent fc6c3a3df2
commit 131bfaa14d
3 changed files with 8 additions and 8 deletions

View File

@@ -92,7 +92,9 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
/// Loop over default header and enable 'OpenAllUnread' and 'TagMarkAllRead' based on unread count.
- (void)setHeaderHasUnread:(BOOL)hasUnread hasRead:(BOOL)hasRead {
- (void)setHeaderHasUnread:(UnreadTotal*)count {
BOOL hasUnread = count.unread > 0;
BOOL hasRead = count.unread < count.total;
NSInteger i = [self indexOfItemWithTag:TagHeaderDelimiter] - 1;
for (; i >= 0; i--) {
NSMenuItem *item = [self itemAtIndex:i];