Fix: 'Update all feeds' unread count during update
This commit is contained in:
@@ -9,6 +9,9 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe
|
||||
### Added
|
||||
- Changelog
|
||||
|
||||
### Fixed
|
||||
- 'Update all feeds' will shows unread items count properly during update
|
||||
|
||||
|
||||
## [0.9.2] - 2019-03-07
|
||||
### Added
|
||||
@@ -45,4 +48,4 @@ Initial release
|
||||
[Unreleased]: https://github.com/relikd/baRSS/compare/v0.9.2...HEAD
|
||||
[0.9.2]: https://github.com/relikd/baRSS/compare/v0.9.1...v0.9.2
|
||||
[0.9.1]: https://github.com/relikd/baRSS/compare/v0.9...v0.9.1
|
||||
[0.9]: https://github.com/relikd/baRSS/compare/e1f36514a8aa2d5fb9a575b6eb19adc2ce4a04d9...v0.9
|
||||
[0.9]: https://github.com/relikd/baRSS/compare/e1f36514a8aa2d5fb9a575b6eb19adc2ce4a04d9...v0.9
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
546FC4462118A8E6007CC3A3 /* Preferences.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Preferences.xib; sourceTree = "<group>"; };
|
||||
5477D34C21233C62002BA27F /* FeedGroup+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FeedGroup+Ext.h"; sourceTree = "<group>"; };
|
||||
5477D34D21233C62002BA27F /* FeedGroup+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "FeedGroup+Ext.m"; sourceTree = "<group>"; };
|
||||
54892F1D2235285700271CBA /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
|
||||
5496B50F214D6275003ED4ED /* UserPrefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserPrefs.h; sourceTree = "<group>"; };
|
||||
5496B510214D6275003ED4ED /* UserPrefs.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserPrefs.m; sourceTree = "<group>"; };
|
||||
54A07A7D220E04CF00082C51 /* NSFetchRequest+Ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSFetchRequest+Ext.h"; sourceTree = "<group>"; };
|
||||
@@ -251,6 +252,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
540CD14821C094A2004AB594 /* README.md */,
|
||||
54892F1D2235285700271CBA /* CHANGELOG.md */,
|
||||
54ACC27E21061B3B0020715F /* baRSS */,
|
||||
54CC042D2162532800A48795 /* baRSS-Helper */,
|
||||
54ACC27D21061B3B0020715F /* Products */,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user