Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
[global] apparently this got lost in the Great iCloud Drive Fire
Browse files Browse the repository at this point in the history
this wouldn't have happened if steve jobs were still alive
  • Loading branch information
kirb committed Nov 23, 2016
1 parent 85f3772 commit 01195f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions global/HBTSConversationPreferences.x
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
#pragma mark - Should be enabled

+ (BOOL)isAvailable {
static BOOL hasConflict = NO;
static BOOL isAvailable = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// we need to be on iOS 9.0+
hasConflict = !IS_IOS_OR_NEWER(iOS_9_0) &&
isAvailable = IS_IOS_OR_NEWER(iOS_9_0) &&
// we don't really want to do anything if someone else is already doing it
[[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/DynamicLibraries/SelectiveReading.dylib"] &&
![[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/DynamicLibraries/SelectiveReading.dylib"] &&
// Remote Messages also likes to be annoying by calling its daemon
// com.apple.MobileSMS. make sure we don’t touch it
[[NSBundle mainBundle].executablePath isEqualToString:@"/Library/Application Support/RemoteMessages/RemoteMessages"];
![[NSBundle mainBundle].executablePath isEqualToString:@"/Library/Application Support/RemoteMessages/RemoteMessages"];
});

return !hasConflict;
return isAvailable;
}

+ (BOOL)shouldEnable {
Expand Down

0 comments on commit 01195f0

Please sign in to comment.