Welcome message

This commit is contained in:
relikd
2019-08-11 12:45:06 +02:00
parent c717487b0e
commit b081564eca
12 changed files with 74 additions and 30 deletions

View File

@@ -112,6 +112,11 @@
#pragma mark - Count Elements
/// @return @c YES if core data has no stored @c FeedGroup
+ (BOOL)isEmpty {
return [[FeedGroup fetchRequest] fetchFirst:[self getMainContext]] == nil;
}
/// @return Sum of all unread @c FeedArticle items.
+ (NSUInteger)countTotalUnread {
return [[[FeedArticle fetchRequest] where:@"unread = YES"] fetchCount: [self getMainContext]];