Fixed a crash that occurs when trying to add a new feed with no active accounts

This commit is contained in:
Phil Viso
2019-05-19 09:10:19 -05:00
parent e98d28c770
commit 5ded56fc28
2 changed files with 19 additions and 3 deletions

View File

@@ -227,6 +227,10 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
return true
}
if item.action == #selector(showAddFeedWindow(_:)) {
return canAddNewFeed()
}
return true
}
@@ -591,6 +595,10 @@ private extension MainWindowController {
return currentTimelineViewController?.canMarkAllAsRead() ?? false
}
func canAddNewFeed() -> Bool {
return sidebarViewController?.canAddNewFeed() ?? false
}
func validateToggleRead(_ item: NSValidatedUserInterfaceItem) -> Bool {