feat: introduce new Pref_article options

This commit is contained in:
relikd
2025-12-11 15:46:40 +01:00
parent 5d339b8125
commit 2e77f67102
6 changed files with 14 additions and 11 deletions

View File

@@ -58,8 +58,8 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
// Check user preferences to show only unread entries
if (unread == 0 && !showHidden
&& (fg.type == FEED || fg.type == GROUP)
&& UserPrefsBool(Pref_groupUnreadOnly)) {
&& ((fg.type == GROUP && UserPrefsBool(Pref_groupUnreadOnly))
|| (fg.type == FEED && UserPrefsBool(Pref_feedUnreadOnly)))) {
item.hidden = YES;
}
@@ -212,11 +212,12 @@ typedef NS_ENUM(NSInteger, MenuItemTag) {
if (loc != NSNotFound)
self.title = [self.title substringToIndex:loc];
}
if (count > 0 && UserPrefsBool(self.submenu.isFeedMenu ? Pref_feedUnreadCount : Pref_groupUnreadCount)) {
BOOL isFeed = self.submenu.isFeedMenu;
if (count > 0 && UserPrefsBool(isFeed ? Pref_feedUnreadCount : Pref_groupUnreadCount)) {
self.tag = TagTitleCountVisible; // apply new mask
self.title = [self.title stringByAppendingFormat:@" (%ld)", count];
self.onStateImage = [NSImage imageNamed:RSSImageMenuItemUnread];
if (UserPrefsBool(Pref_groupUnreadIndicator))
if (UserPrefsBool(isFeed ? Pref_feedUnreadIndicator : Pref_groupUnreadIndicator))
self.state = NSControlStateValueOn;
}
}