4 Commits

Author SHA1 Message Date
relikd
4d49b3fb38 Increment version number for v0.9.4 2019-04-02 16:04:58 +02:00
relikd
a1b91e51f9 Fix: Mark blocks of reappearing ghost items as read 2019-04-02 15:52:03 +02:00
relikd
7004db25e5 Remove unreliable 'Start on login' 2019-04-01 15:07:33 +02:00
relikd
935325af04 First, remove old articles, then add new ones. Closes #4 2019-04-01 13:29:04 +02:00
8 changed files with 90 additions and 292 deletions

View File

@@ -8,6 +8,15 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe
## [Unreleased] ## [Unreleased]
## [0.9.4] - 2019-04-02
### Fixed
- Article order got mixed up for some feeds (issue: #4)
- If multiple consecutive items reappear in the middle of the feed mark them read
### Changed
- Removed 'Start on login'. Use Preferences > Users > Login Items instead.
## [0.9.3] - 2019-03-14 ## [0.9.3] - 2019-03-14
### Added ### Added
- Changelog - Changelog
@@ -50,7 +59,8 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe
Initial release Initial release
[Unreleased]: https://github.com/relikd/baRSS/compare/v0.9.2...HEAD [Unreleased]: https://github.com/relikd/baRSS/compare/v0.9.4...HEAD
[0.9.4]: https://github.com/relikd/baRSS/compare/v0.9.3...v0.9.4
[0.9.3]: https://github.com/relikd/baRSS/compare/v0.9.2...v0.9.3 [0.9.3]: https://github.com/relikd/baRSS/compare/v0.9.2...v0.9.3
[0.9.2]: https://github.com/relikd/baRSS/compare/v0.9.1...v0.9.2 [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.1]: https://github.com/relikd/baRSS/compare/v0.9...v0.9.1

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 relikd. Public Domain.</string>
<key>LSBackgroundOnly</key>
<true/>
</dict>
</plist>

View File

@@ -1,49 +0,0 @@
//
// The MIT License (MIT)
// Copyright (c) 2018 Oleg Geier
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#import <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
// see: http://martiancraft.com/blog/2015/01/login-items/
NSURL *mainURL = [NSURL fileURLWithPath:@"../../../../" isDirectory:YES relativeToURL:NSBundle.mainBundle.bundleURL];
NSString *mainIdent = [[NSBundle bundleWithURL:mainURL] bundleIdentifier]; // de.relikd.baRSS
NSArray<NSRunningApplication*> *arr = [NSRunningApplication runningApplicationsWithBundleIdentifier:mainIdent];
if (arr.count == 0) { // if not already running
NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
NSString *path = [NSString pathWithComponents:pathComponents];
[[NSWorkspace sharedWorkspace] launchApplication:path];
}
/*
Important: If your daemon shuts down too quickly after being launched,
launchd may think it has crashed. Daemons that continue this behavior may
be suspended and not launched again when future requests arrive. To avoid
this behavior, do not shut down for at least 10 seconds after launch.
*/
// https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html
sleep(10); // Not sure if this is necessary. However, it doesnt hurt.
[NSApp terminate:nil];
}
return 0;
}

View File

@@ -33,12 +33,9 @@
54B749DA2204A85C0022CC6D /* BarStatusItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 54B749D92204A85C0022CC6D /* BarStatusItem.m */; }; 54B749DA2204A85C0022CC6D /* BarStatusItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 54B749D92204A85C0022CC6D /* BarStatusItem.m */; };
54B749E0220636200022CC6D /* FeedArticle+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54B749DF220635CD0022CC6D /* FeedArticle+Ext.m */; }; 54B749E0220636200022CC6D /* FeedArticle+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54B749DF220635CD0022CC6D /* FeedArticle+Ext.m */; };
54BB048921FD2AB500C303A5 /* NSDate+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54BB048821FD2AB500C303A5 /* NSDate+Ext.m */; }; 54BB048921FD2AB500C303A5 /* NSDate+Ext.m in Sources */ = {isa = PBXBuildFile; fileRef = 54BB048821FD2AB500C303A5 /* NSDate+Ext.m */; };
54CC04382162532A00A48795 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CC04372162532A00A48795 /* main.m */; };
54CC043E2162566900A48795 /* baRSS-Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 54CC042C2162532800A48795 /* baRSS-Helper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
54E88320211B509D00064188 /* ModalFeedEdit.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E8831E211B509D00064188 /* ModalFeedEdit.m */; }; 54E88320211B509D00064188 /* ModalFeedEdit.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E8831E211B509D00064188 /* ModalFeedEdit.m */; };
54E88321211B509D00064188 /* ModalFeedEdit.xib in Resources */ = {isa = PBXBuildFile; fileRef = 54E8831F211B509D00064188 /* ModalFeedEdit.xib */; }; 54E88321211B509D00064188 /* ModalFeedEdit.xib in Resources */ = {isa = PBXBuildFile; fileRef = 54E8831F211B509D00064188 /* ModalFeedEdit.xib */; };
54F39C2E210BE1F700AEE730 /* DBv1.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 54ACC28221061B3B0020715F /* DBv1.xcdatamodeld */; }; 54F39C2E210BE1F700AEE730 /* DBv1.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 54ACC28221061B3B0020715F /* DBv1.xcdatamodeld */; };
54F518782162CA4F00EE856C /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54F518772162CA4F00EE856C /* ServiceManagement.framework */; };
54F6025D21C1D4170006D338 /* OpmlExport.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F6025C21C1D4170006D338 /* OpmlExport.m */; }; 54F6025D21C1D4170006D338 /* OpmlExport.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F6025C21C1D4170006D338 /* OpmlExport.m */; };
54FE73D021220DEC003EAC65 /* StoreCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 54FE73CF21220DEC003EAC65 /* StoreCoordinator.m */; }; 54FE73D021220DEC003EAC65 /* StoreCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 54FE73CF21220DEC003EAC65 /* StoreCoordinator.m */; };
54FE73D3212316CD003EAC65 /* BarMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 54FE73D2212316CD003EAC65 /* BarMenu.m */; }; 54FE73D3212316CD003EAC65 /* BarMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 54FE73D2212316CD003EAC65 /* BarMenu.m */; };
@@ -66,16 +63,6 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
54CC043D2162565F00A48795 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = Contents/Library/LoginItems;
dstSubfolderSpec = 1;
files = (
54CC043E2162566900A48795 /* baRSS-Helper.app in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@@ -128,13 +115,9 @@
54B749DF220635CD0022CC6D /* FeedArticle+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "FeedArticle+Ext.m"; sourceTree = "<group>"; }; 54B749DF220635CD0022CC6D /* FeedArticle+Ext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "FeedArticle+Ext.m"; sourceTree = "<group>"; };
54BB048721FD2AB500C303A5 /* NSDate+Ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Ext.h"; sourceTree = "<group>"; }; 54BB048721FD2AB500C303A5 /* NSDate+Ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Ext.h"; sourceTree = "<group>"; };
54BB048821FD2AB500C303A5 /* NSDate+Ext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Ext.m"; sourceTree = "<group>"; }; 54BB048821FD2AB500C303A5 /* NSDate+Ext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Ext.m"; sourceTree = "<group>"; };
54CC042C2162532800A48795 /* baRSS-Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "baRSS-Helper.app"; sourceTree = BUILT_PRODUCTS_DIR; };
54CC04362162532A00A48795 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
54CC04372162532A00A48795 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
54E8831D211B509D00064188 /* ModalFeedEdit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModalFeedEdit.h; sourceTree = "<group>"; }; 54E8831D211B509D00064188 /* ModalFeedEdit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModalFeedEdit.h; sourceTree = "<group>"; };
54E8831E211B509D00064188 /* ModalFeedEdit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalFeedEdit.m; sourceTree = "<group>"; }; 54E8831E211B509D00064188 /* ModalFeedEdit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalFeedEdit.m; sourceTree = "<group>"; };
54E8831F211B509D00064188 /* ModalFeedEdit.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModalFeedEdit.xib; sourceTree = "<group>"; }; 54E8831F211B509D00064188 /* ModalFeedEdit.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ModalFeedEdit.xib; sourceTree = "<group>"; };
54F518772162CA4F00EE856C /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; };
54F6025B21C1D4170006D338 /* OpmlExport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpmlExport.h; sourceTree = "<group>"; }; 54F6025B21C1D4170006D338 /* OpmlExport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpmlExport.h; sourceTree = "<group>"; };
54F6025C21C1D4170006D338 /* OpmlExport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OpmlExport.m; sourceTree = "<group>"; }; 54F6025C21C1D4170006D338 /* OpmlExport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OpmlExport.m; sourceTree = "<group>"; };
54FE73CE21220DEC003EAC65 /* StoreCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StoreCoordinator.h; sourceTree = "<group>"; }; 54FE73CE21220DEC003EAC65 /* StoreCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StoreCoordinator.h; sourceTree = "<group>"; };
@@ -148,18 +131,10 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
54F518782162CA4F00EE856C /* ServiceManagement.framework in Frameworks */,
544DCCB9212A2B4D002DBC46 /* RSXML.framework in Frameworks */, 544DCCB9212A2B4D002DBC46 /* RSXML.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
54CC04292162532800A48795 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
@@ -196,7 +171,6 @@
544FBD4321064AEB008A260C /* Frameworks */ = { 544FBD4321064AEB008A260C /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
54F518772162CA4F00EE856C /* ServiceManagement.framework */,
544DCCB8212A2B4D002DBC46 /* RSXML.framework */, 544DCCB8212A2B4D002DBC46 /* RSXML.framework */,
544DCCBD212A2B6F002DBC46 /* RSXML.framework.dSYM */, 544DCCBD212A2B6F002DBC46 /* RSXML.framework.dSYM */,
); );
@@ -254,7 +228,6 @@
540CD14821C094A2004AB594 /* README.md */, 540CD14821C094A2004AB594 /* README.md */,
54892F1D2235285700271CBA /* CHANGELOG.md */, 54892F1D2235285700271CBA /* CHANGELOG.md */,
54ACC27E21061B3B0020715F /* baRSS */, 54ACC27E21061B3B0020715F /* baRSS */,
54CC042D2162532800A48795 /* baRSS-Helper */,
54ACC27D21061B3B0020715F /* Products */, 54ACC27D21061B3B0020715F /* Products */,
544FBD4321064AEB008A260C /* Frameworks */, 544FBD4321064AEB008A260C /* Frameworks */,
); );
@@ -264,7 +237,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
54ACC27C21061B3B0020715F /* baRSS Beta.app */, 54ACC27C21061B3B0020715F /* baRSS Beta.app */,
54CC042C2162532800A48795 /* baRSS-Helper.app */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -287,15 +259,6 @@
path = baRSS; path = baRSS;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
54CC042D2162532800A48795 /* baRSS-Helper */ = {
isa = PBXGroup;
children = (
54CC04362162532A00A48795 /* Info.plist */,
54CC04372162532A00A48795 /* main.m */,
);
path = "baRSS-Helper";
sourceTree = "<group>";
};
54E88323211B542E00064188 /* Feeds Tab */ = { 54E88323211B542E00064188 /* Feeds Tab */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -323,7 +286,6 @@
54ACC27A21061B3B0020715F /* Resources */, 54ACC27A21061B3B0020715F /* Resources */,
544DCCBB212A2B4D002DBC46 /* Embed Frameworks */, 544DCCBB212A2B4D002DBC46 /* Embed Frameworks */,
544DCCBC212A2B5A002DBC46 /* CopyFiles */, 544DCCBC212A2B5A002DBC46 /* CopyFiles */,
54CC043D2162565F00A48795 /* CopyFiles */,
543964EE2215C27B0016AAA3 /* ShellScript */, 543964EE2215C27B0016AAA3 /* ShellScript */,
); );
buildRules = ( buildRules = (
@@ -335,23 +297,6 @@
productReference = 54ACC27C21061B3B0020715F /* baRSS Beta.app */; productReference = 54ACC27C21061B3B0020715F /* baRSS Beta.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
54CC042B2162532800A48795 /* baRSS-Helper */ = {
isa = PBXNativeTarget;
buildConfigurationList = 54CC043C2162532A00A48795 /* Build configuration list for PBXNativeTarget "baRSS-Helper" */;
buildPhases = (
54CC04282162532800A48795 /* Sources */,
54CC04292162532800A48795 /* Frameworks */,
54CC042A2162532800A48795 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "baRSS-Helper";
productName = "baRSS-Helper";
productReference = 54CC042C2162532800A48795 /* baRSS-Helper.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
@@ -373,14 +318,6 @@
}; };
}; };
}; };
54CC042B2162532800A48795 = {
CreatedOnToolsVersion = 9.4.1;
SystemCapabilities = {
com.apple.Sandbox = {
enabled = 0;
};
};
};
}; };
}; };
buildConfigurationList = 54ACC27721061B3B0020715F /* Build configuration list for PBXProject "baRSS" */; buildConfigurationList = 54ACC27721061B3B0020715F /* Build configuration list for PBXProject "baRSS" */;
@@ -397,7 +334,6 @@
projectRoot = ""; projectRoot = "";
targets = ( targets = (
54ACC27B21061B3B0020715F /* baRSS */, 54ACC27B21061B3B0020715F /* baRSS */,
54CC042B2162532800A48795 /* baRSS-Helper */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
@@ -415,13 +351,6 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
54CC042A2162532800A48795 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
@@ -476,14 +405,6 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
54CC04282162532800A48795 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
54CC04382162532A00A48795 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
@@ -695,44 +616,6 @@
}; };
name = Release; name = Release;
}; };
54CC043A2162532A00A48795 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "baRSS-Helper/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = "de.relikd.baRSS-Helper";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Debug;
};
54CC043B2162532A00A48795 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "baRSS-Helper/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = "de.relikd.baRSS-Helper";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
@@ -754,15 +637,6 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
54CC043C2162532A00A48795 /* Build configuration list for PBXNativeTarget "baRSS-Helper" */ = {
isa = XCConfigurationList;
buildConfigurations = (
54CC043A2162532A00A48795 /* Debug */,
54CC043B2162532A00A48795 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCVersionGroup section */ /* Begin XCVersionGroup section */

View File

@@ -92,9 +92,10 @@
self.group.name = obj.title; self.group.name = obj.title;
// Add and remove articles // Add and remove articles
NSMutableSet<FeedArticle*> *oldSet = [self.articles mutableCopy]; NSMutableSet<FeedArticle*> *localSet = [self.articles mutableCopy];
NSInteger diff = [self addMissingArticles:obj withOldSet:oldSet]; // will remove items that should be kept NSInteger diff = 0;
diff -= [self deleteArticlesWithOldSet:oldSet]; // remove old, outdated articles diff -= [self deleteArticles:localSet withRemoteSet:obj.articles]; // remove old, outdated articles
diff += [self insertArticles:localSet withRemoteSet:obj.articles]; // insert new in correct order
// Get new total article count and post unread-count-change notification // Get new total article count and post unread-count-change notification
if (flag && diff != 0) { if (flag && diff != 0) {
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationTotalUnreadCountChanged object:@(diff)]; [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationTotalUnreadCountChanged object:@(diff)];
@@ -108,58 +109,61 @@
New articles should be in ascending order without any gaps in between. New articles should be in ascending order without any gaps in between.
If new article is disjunct from the article before, assume a deleted article re-appeared and mark it as read. If new article is disjunct from the article before, assume a deleted article re-appeared and mark it as read.
@param oldSet Input will be used to identify new articles. @param localSet Use result set @c localSet of method call @c deleteArticles:withRemoteSet:.
Output contains articles that aren't present in the feed anymore and should be deleted. @param remoteSet Readonly copy of @c RSParsedFeed.articles.
*/ */
- (NSInteger)addMissingArticles:(RSParsedFeed*)obj withOldSet:(NSMutableSet<FeedArticle*>*)oldSet { - (NSUInteger)insertArticles:(NSMutableSet<FeedArticle*>*)localSet withRemoteSet:(NSArray<RSParsedArticle*>*)remoteSet {
NSInteger newOnes = 0; int32_t currentIndex = [[localSet valueForKeyPath:@"@min.sortIndex"] intValue];
int32_t currentIndex = [[self.articles valueForKeyPath:@"@min.sortIndex"] intValue]; NSMutableArray<FeedArticle*>* newlyInserted = [NSMutableArray arrayWithCapacity:remoteSet.count];
FeedArticle *lastInserted = nil;
BOOL hasGapBetweenNewArticles = NO;
for (RSParsedArticle *article in [obj.articles reverseObjectEnumerator]) { for (RSParsedArticle *article in [remoteSet reverseObjectEnumerator]) {
// reverse enumeration ensures correct article order // reverse enumeration ensures correct article order
FeedArticle *storedArticle = [self findArticle:article inSet:oldSet]; FeedArticle *storedArticle = [self findRemoteArticle:article inLocalSet:localSet];
if (storedArticle) { if (storedArticle) {
[oldSet removeObject:storedArticle]; [localSet removeObject:storedArticle];
// If we encounter an already existing item, assume newly inserted are "ghost" items and mark read.
if (newlyInserted.count > 0) {
for (FeedArticle *ghostItem in newlyInserted) {
ghostItem.unread = NO;
}
[newlyInserted removeAllObjects];
}
// Ensures consecutive block of incrementing numbers on sortIndex
if (storedArticle.sortIndex != currentIndex) { if (storedArticle.sortIndex != currentIndex) {
storedArticle.sortIndex = currentIndex; storedArticle.sortIndex = currentIndex;
} }
hasGapBetweenNewArticles = YES;
} else { } else {
newOnes += 1; FeedArticle *newArticle = [FeedArticle newArticle:article inContext:self.managedObjectContext];
if (hasGapBetweenNewArticles && lastInserted) { // gap with at least one article inbetween newArticle.sortIndex = currentIndex;
lastInserted.unread = NO; [self addArticlesObject:newArticle];
newOnes -= 1; [newlyInserted addObject:newArticle];
}
hasGapBetweenNewArticles = NO;
lastInserted = [FeedArticle newArticle:article inContext:self.managedObjectContext];
lastInserted.sortIndex = currentIndex;
[self addArticlesObject:lastInserted];
} }
currentIndex += 1; currentIndex += 1;
} }
if (hasGapBetweenNewArticles && lastInserted) { return newlyInserted.count; // all ghost items are removed already
lastInserted.unread = NO;
newOnes -= 1;
}
return newOnes;
} }
/** /**
Delete all articles from core data, that are still in the oldSet. Delete all articles from core data, that aren't present anymore.
@param localSet Input a copy of @c self.articles. Output the same set minus deleted articles.
@param remoteSet Readonly copy of @c RSParsedFeed.articles.
*/ */
- (NSUInteger)deleteArticlesWithOldSet:(NSMutableSet<FeedArticle*>*)oldSet { - (NSUInteger)deleteArticles:(NSMutableSet<FeedArticle*>*)localSet withRemoteSet:(NSArray<RSParsedArticle*>*)remoteSet {
if (!oldSet || oldSet.count == 0)
return 0;
NSUInteger c = 0; NSUInteger c = 0;
for (FeedArticle *fa in oldSet) { NSMutableSet<FeedArticle*> *deletingSet = [NSMutableSet setWithCapacity:localSet.count];
if (fa.unread) ++c; for (FeedArticle *fa in localSet) {
// TODO: keep unread articles? if (![self findLocalArticle:fa inRemoteSet:remoteSet]) {
[self.managedObjectContext deleteObject:fa]; if (fa.unread) ++c;
// TODO: keep unread articles?
[self.managedObjectContext deleteObject:fa];
[deletingSet addObject:fa];
}
}
if (deletingSet.count > 0) {
[localSet minusSet:deletingSet];
[self removeArticles:deletingSet];
} }
if (oldSet.count > 0)
[self removeArticles:oldSet];
return c; return c;
} }
@@ -177,17 +181,34 @@
} }
/** /**
Iterate over oldSet and return the one where @c link and @c guid matches. Or @c nil if no matching article found. Iterate over localSet and return the one where @c link and @c guid matches. Or @c nil if no matching article found.
*/ */
- (FeedArticle*)findArticle:(RSParsedArticle*)article inSet:(NSSet<FeedArticle*>*)oldSet { - (FeedArticle*)findRemoteArticle:(RSParsedArticle*)remote inLocalSet:(NSSet<FeedArticle*>*)localSet {
NSString *searchLink = article.link; NSString *searchLink = remote.link;
NSString *searchGuid = article.guid; NSString *searchGuid = remote.guid;
BOOL linkIsNil = (searchLink == nil); BOOL linkIsNil = (searchLink == nil);
BOOL guidIsNil = (searchGuid == nil); BOOL guidIsNil = (searchGuid == nil);
for (FeedArticle *old in oldSet) { for (FeedArticle *art in localSet) {
if ((linkIsNil && old.link == nil) || [old.link isEqualToString:searchLink]) { if ((linkIsNil && art.link == nil) || [art.link isEqualToString:searchLink]) {
if ((guidIsNil && old.guid == nil) || [old.guid isEqualToString:searchGuid]) if ((guidIsNil && art.guid == nil) || [art.guid isEqualToString:searchGuid])
return old; return art;
}
}
return nil;
}
/**
Iterate over remoteSet and return the one where @c link and @c guid matches. Or @c nil if no matching article found.
*/
- (RSParsedArticle*)findLocalArticle:(FeedArticle*)local inRemoteSet:(NSArray<RSParsedArticle*>*)remoteSet {
NSString *searchLink = local.link;
NSString *searchGuid = local.guid;
BOOL linkIsNil = (searchLink == nil);
BOOL guidIsNil = (searchGuid == nil);
for (RSParsedArticle *art in remoteSet) {
if ((linkIsNil && art.link == nil) || [art.link isEqualToString:searchLink]) {
if ((guidIsNil && art.guid == nil) || [art.guid isEqualToString:searchGuid])
return art;
} }
} }
return nil; return nil;

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.9.3</string> <string>0.9.4</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
@@ -32,7 +32,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1153</string> <string>1208</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key> <key>LSUIElement</key>

View File

@@ -27,8 +27,6 @@
#import "StoreCoordinator.h" #import "StoreCoordinator.h"
#import "Constants.h" #import "Constants.h"
#import <ServiceManagement/ServiceManagement.h>
@interface SettingsGeneral() @interface SettingsGeneral()
@property (weak) IBOutlet NSPopUpButton *popupHttpApplication; @property (weak) IBOutlet NSPopUpButton *popupHttpApplication;
@property (weak) IBOutlet NSPopUpButton *popupDefaultRSSReader; @property (weak) IBOutlet NSPopUpButton *popupDefaultRSSReader;
@@ -49,17 +47,6 @@
#pragma mark - UI interaction with IBAction #pragma mark - UI interaction with IBAction
/// Run helper application to add thyself to startup items.
- (IBAction)changeStartOnLogin:(NSButton *)sender {
// launchctl list | grep de.relikd
CFStringRef helperIdentifier = CFBridgingRetain(@"de.relikd.baRSS-Helper");
Boolean setOnLogin = (sender.state == NSControlStateValueOn);
if (!helperIdentifier || !SMLoginItemSetEnabled(helperIdentifier, setOnLogin))
sender.state = (setOnLogin ? NSControlStateValueOff : NSControlStateValueOn); // restore prev state
if (helperIdentifier)
CFRelease(helperIdentifier);
}
- (IBAction)fixCache:(NSButton *)sender { - (IBAction)fixCache:(NSButton *)sender {
NSUInteger deleted = [StoreCoordinator deleteUnreferenced]; NSUInteger deleted = [StoreCoordinator deleteUnreferenced];
[StoreCoordinator restoreFeedIndexPaths]; [StoreCoordinator restoreFeedIndexPaths];

View File

@@ -21,25 +21,19 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="327"/> <rect key="frame" x="0.0" y="0.0" width="320" height="327"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XF4-m8-sya"> <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QwE-M7-q2R">
<rect key="frame" x="18" y="291" width="284" height="18"/> <rect key="frame" x="151" y="13" width="155" height="32"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="check" title="Start on login" bezelStyle="regularSquare" imagePosition="left" inset="2" id="WwD-9B-kMx"> <buttonCell key="cell" type="push" title="Fix Cache" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ady-2s-Ggm">
<behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
</buttonCell> </buttonCell>
<connections> <connections>
<action selector="changeStartOnLogin:" target="-2" id="e05-eb-6ni"/> <action selector="fixCache:" target="-2" id="gbM-hA-UVF"/>
<binding destination="iU7-KA-nY5" name="value" keyPath="values.startOnLogin" id="LnI-lN-nUf">
<dictionary key="options">
<bool key="NSAllowsEditingMultipleValuesSelection" value="NO"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
</connections> </connections>
</button> </button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2sG-NO-OJz"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2sG-NO-OJz">
<rect key="frame" x="18" y="254" width="133" height="17"/> <rect key="frame" x="18" y="288" width="133" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Open URLs with:" id="vNb-i3-dvE"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Open URLs with:" id="vNb-i3-dvE">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
@@ -48,7 +42,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BcN-gW-jBg"> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BcN-gW-jBg">
<rect key="frame" x="155" y="249" width="148" height="26"/> <rect key="frame" x="155" y="283" width="148" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="-- list --" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="qW6-vv-pdE" id="R91-En-pHg"> <popUpButtonCell key="cell" type="push" title="-- list --" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="qW6-vv-pdE" id="R91-En-pHg">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -64,7 +58,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TC5-cu-zUi"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TC5-cu-zUi">
<rect key="frame" x="18" y="227" width="133" height="17"/> <rect key="frame" x="18" y="261" width="133" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Default RSS Reader:" id="wvK-Oz-Kk3"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Default RSS Reader:" id="wvK-Oz-Kk3">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
@@ -73,7 +67,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tJe-jL-nUu"> <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tJe-jL-nUu">
<rect key="frame" x="155" y="222" width="148" height="26"/> <rect key="frame" x="155" y="256" width="148" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="-- list --" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4Gg-hZ-mh4" id="saR-9h-TWE"> <popUpButtonCell key="cell" type="push" title="-- list --" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4Gg-hZ-mh4" id="saR-9h-TWE">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -88,17 +82,6 @@
<action selector="changeDefaultRSSReader:" target="-2" id="ul1-1K-oJb"/> <action selector="changeDefaultRSSReader:" target="-2" id="ul1-1K-oJb"/>
</connections> </connections>
</popUpButton> </popUpButton>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QwE-M7-q2R">
<rect key="frame" x="151" y="13" width="155" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Fix Cache" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ady-2s-Ggm">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="fixCache:" target="-2" id="gbM-hA-UVF"/>
</connections>
</button>
</subviews> </subviews>
<point key="canvasLocation" x="33" y="-153.5"/> <point key="canvasLocation" x="33" y="-153.5"/>
</customView> </customView>