Skip to content

Commit

Permalink
Merge pull request #71 from bitpiston/release/1.7.1
Browse files Browse the repository at this point in the history
Merge v1.7.1 release:

- Blacklists Apple Mail as old user profiles from when Apple Mail supported RSS could be set as the default feed handler in launch services
- Removes setting the default handler from launch services at first run. User interaction is now required to select their news reader.
  • Loading branch information
einkoro authored Oct 15, 2021
2 parents c404344 + 6c7ca9c commit c93d8df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
1 change: 1 addition & 0 deletions RSS-Button-MacOS/SettingsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class SettingsManager {
let badgeButtonKey = "badgeButtonState"
let unsupportedHandlers = [
"com.apple.news", // Apple News
"com.apple.mail", // Apple Mail
"com.newsbar-app", // Newsbar
"org.mozilla.thunderbird", // Mozilla Thunderbird
"com.reederapp.rkit2.mac", // Reeder v3
Expand Down
25 changes: 8 additions & 17 deletions RSS-Button-MacOS/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,19 @@ class ViewController: NSViewController, NSWindowDelegate, NSTextFieldDelegate {

self.readerPopUpButton.menu = readerMenu

// Set the default feed handler if on first run unless apple news
if !self.settingsManager.isFeedHandlerSet() {
if defaultFeedHandler != nil && defaultFeedHandler! as String != "com.apple.news",
let feedHandlerToSet = self.feedHandlers.first(where: {$0.appId == defaultFeedHandler! as String}) {

if self.settingsManager.isSupportedFeedHandler() {
self.readerPopUpButton.selectItem(withTitle: feedHandlerToSet.title)
self.settingsManager.setFeedHandler(feedHandlerToSet)
}
} else {
if self.feedHandlers.filter({$0.type == FeedHandlerType.app}).count > 0 {
self.settingsManager.noFeedHandlerConfiguredAlert()
} else {
self.settingsManager.noFeedHandlersAlert()
}
}
} else {
// Set the feed handler if configured or alert
if self.settingsManager.isFeedHandlerSet() {
if (self.feedHandlers.first(where: {$0.title == feedHandler.title}) != nil) {
self.readerPopUpButton.selectItem(withTitle: feedHandler.title)
} else {
self.settingsManager.noFeedHandlerConfiguredAlert()
}
} else {
if self.feedHandlers.filter({$0.type == FeedHandlerType.app}).count > 0 {
self.settingsManager.noFeedHandlerConfiguredAlert()
} else {
self.settingsManager.noFeedHandlersAlert()
}
}
}

Expand Down
16 changes: 8 additions & 8 deletions RSS-Button-for-Safari.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 74;
CURRENT_PROJECT_VERSION = 75;
DEVELOPMENT_TEAM = YE2H3T9GV5;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "RSS-Button-MacOS/Info.plist";
Expand All @@ -595,7 +595,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.7.1;
"OTHER_SWIFT_FLAGS[arch=*]" = "-D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.bitpiston.RSSButton4Safari;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -614,7 +614,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 74;
CURRENT_PROJECT_VERSION = 75;
DEVELOPMENT_TEAM = YE2H3T9GV5;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "RSS-Button-MacOS/Info.plist";
Expand All @@ -623,7 +623,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.bitpiston.RSSButton4Safari;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -717,7 +717,7 @@
CODE_SIGN_ENTITLEMENTS = "RSS-Button-Safari-Extension/RSS_Button.entitlements";
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 74;
CURRENT_PROJECT_VERSION = 75;
DEVELOPMENT_TEAM = YE2H3T9GV5;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "RSS-Button-Safari-Extension/Info.plist";
Expand All @@ -727,7 +727,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.7.1;
"OTHER_SWIFT_FLAGS[arch=*]" = "-D DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.bitpiston.RSSButton4Safari.SafariExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -745,7 +745,7 @@
CODE_SIGN_ENTITLEMENTS = "RSS-Button-Safari-Extension/RSS_Button.entitlements";
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 74;
CURRENT_PROJECT_VERSION = 75;
DEVELOPMENT_TEAM = YE2H3T9GV5;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "RSS-Button-Safari-Extension/Info.plist";
Expand All @@ -755,7 +755,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.7;
MARKETING_VERSION = 1.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.bitpiston.RSSButton4Safari.SafariExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit c93d8df

Please sign in to comment.