From 1a74107f29e8a68eaef48aa795f7878e0488afdf Mon Sep 17 00:00:00 2001 From: Jakub Suder Date: Sun, 29 Mar 2015 23:51:12 +0200 Subject: [PATCH] [#449] notification center is always available --- Hive/Backend/HINotificationService.h | 3 --- Hive/Backend/HINotificationService.m | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Hive/Backend/HINotificationService.h b/Hive/Backend/HINotificationService.h index 24750963..89879d56 100644 --- a/Hive/Backend/HINotificationService.h +++ b/Hive/Backend/HINotificationService.h @@ -3,9 +3,6 @@ */ @interface HINotificationService : NSObject -/* Test in notifications are supported on the current OS version. */ -@property (nonatomic, assign, readonly) BOOL notificationsAvailable; - /* Enables or disables notifications. */ @property (nonatomic, assign) BOOL enabled; diff --git a/Hive/Backend/HINotificationService.m b/Hive/Backend/HINotificationService.m index 93c0c058..41af872e 100644 --- a/Hive/Backend/HINotificationService.m +++ b/Hive/Backend/HINotificationService.m @@ -35,17 +35,13 @@ + (HINotificationService *)sharedService { return sharedService; } -- (BOOL)notificationsAvailable { - return NSClassFromString(@"NSUserNotificationCenter") != nil; -} - - (void)setEnabled:(BOOL)enabled { - enabled = enabled && self.notificationsAvailable; if (!_enabled && enabled) { [self enable]; } else if (_enabled && !enabled) { [self disable]; } + _enabled = enabled; }