Use conditional in guard statement instead of setting an unused variable

This commit is contained in:
Angelo Stavrow 2020-08-02 08:49:37 -04:00
parent a0fea768bf
commit be8fedbf11
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
1 changed files with 4 additions and 2 deletions

View File

@ -56,8 +56,10 @@ final class WebFeedInspectorViewController: NSViewController, Inspector {
// MARK: Actions
@IBAction func isNotifyAboutNewArticlesChanged(_ sender: Any) {
guard let settings = userNotificationSettings else {
isNotifyAboutNewArticlesCheckBox.setNextState()
guard userNotificationSettings != nil else {
DispatchQueue.main.async {
self.isNotifyAboutNewArticlesCheckBox.setNextState()
}
return
}