Fix: 'Update all feeds' unread count during update

This commit is contained in:
relikd
2019-03-10 12:16:32 +01:00
parent 0c9b128cfe
commit 039c7bc734
5 changed files with 10 additions and 4 deletions

View File

@@ -303,7 +303,7 @@ static BOOL _nextUpdateIsForced = NO;
needsNotification = YES;
}
}
[StoreCoordinator saveContext:moc andParent:NO];
[StoreCoordinator saveContext:moc andParent:YES];
if (needsNotification)
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationFeedUpdated object:oid];
if (block) block(success);
@@ -400,7 +400,7 @@ static BOOL _nextUpdateIsForced = NO;
[self downloadFavicon:faviconURL finished:^(NSImage *img) {
Feed *f = [moc objectWithID:oid];
if (f && [f setIconImage:img]) {
[StoreCoordinator saveContext:moc andParent:NO];
[StoreCoordinator saveContext:moc andParent:YES];
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationFeedIconUpdated object:oid];
}
if (block) block();

View File

@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1122</string>
<string>1146</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>

View File

@@ -154,6 +154,7 @@
[self.unreadMap updateAllCounts:updated forPath:feed.indexPath];
// 2. rebuild articles menu if it is open
if (item.submenu.isFeedMenu) { // menu item is visible
item.image = [feed iconImage16];
item.enabled = (feed.articles.count > 0);
if (item.submenu.numberOfItems > 0) { // replace articles menu
[item.submenu removeAllItems];