fix cc grabber not reappearing unless respringing
This commit is contained in:
27
Tweak.x
27
Tweak.x
@ -25,6 +25,8 @@ static BOOL hideLSBatt;
|
|||||||
static BOOL statusBarShowTimeLS;
|
static BOOL statusBarShowTimeLS;
|
||||||
static BOOL hideLabels;
|
static BOOL hideLabels;
|
||||||
static BOOL hideFolderBadges;
|
static BOOL hideFolderBadges;
|
||||||
|
//static BOOL hideStatusBarLS;
|
||||||
|
static BOOL hideCCGrabber;
|
||||||
|
|
||||||
static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
|
static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
|
||||||
NSNumber *eEnabled = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"enabled" inDomain:nsDomainString];
|
NSNumber *eEnabled = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"enabled" inDomain:nsDomainString];
|
||||||
@ -34,6 +36,8 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
|
|||||||
NSNumber *eStatusBarShowTimeLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarShowTimeLS" inDomain:nsDomainString];
|
NSNumber *eStatusBarShowTimeLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarShowTimeLS" inDomain:nsDomainString];
|
||||||
NSNumber *eHideLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLabels" inDomain:nsDomainString];
|
NSNumber *eHideLabels = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLabels" inDomain:nsDomainString];
|
||||||
NSNumber *eHideFolderBadges = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBadges" inDomain:nsDomainString];
|
NSNumber *eHideFolderBadges = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBadges" inDomain:nsDomainString];
|
||||||
|
//NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString];
|
||||||
|
NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString];
|
||||||
|
|
||||||
enabled = (eEnabled) ? [eEnabled boolValue]:NO;
|
enabled = (eEnabled) ? [eEnabled boolValue]:NO;
|
||||||
hideQuickActionsBG = (eHideQuickActionsBG) ? [eHideQuickActionsBG boolValue]:NO;
|
hideQuickActionsBG = (eHideQuickActionsBG) ? [eHideQuickActionsBG boolValue]:NO;
|
||||||
@ -42,6 +46,8 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
|
|||||||
statusBarShowTimeLS = (eStatusBarShowTimeLS) ? [eStatusBarShowTimeLS boolValue]:NO;
|
statusBarShowTimeLS = (eStatusBarShowTimeLS) ? [eStatusBarShowTimeLS boolValue]:NO;
|
||||||
hideLabels = (eHideLabels) ? [eHideLabels boolValue]:NO;
|
hideLabels = (eHideLabels) ? [eHideLabels boolValue]:NO;
|
||||||
hideFolderBadges = (eHideFolderBadges) ? [eHideFolderBadges boolValue]:NO;
|
hideFolderBadges = (eHideFolderBadges) ? [eHideFolderBadges boolValue]:NO;
|
||||||
|
//hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO;
|
||||||
|
hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// headers and hooks
|
// headers and hooks
|
||||||
@ -55,6 +61,27 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
|
|||||||
-(id)badgeNumberOrString;
|
-(id)badgeNumberOrString;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface CSTeachableMomentsContainerView {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (nonatomic,retain) UIView * controlCenterGrabberView;
|
||||||
|
@end
|
||||||
|
|
||||||
|
// HIDE CC GRABBER START //
|
||||||
|
%hook CSTeachableMomentsContainerView
|
||||||
|
- (void)layoutSubviews {
|
||||||
|
if (enabled && hideCCGrabber) {
|
||||||
|
[self.controlCenterGrabberView setHidden:YES];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self.controlCenterGrabberView setHidden:NO];
|
||||||
|
}
|
||||||
|
return %orig;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
// HIDE CC GRABBER END //
|
||||||
|
|
||||||
// QUICK ACTIONS BG START //
|
// QUICK ACTIONS BG START //
|
||||||
%hook UICoverSheetButton
|
%hook UICoverSheetButton
|
||||||
-(id)_backgroundEffectsWithBrightness:(double)arg1 {
|
-(id)_backgroundEffectsWithBrightness:(double)arg1 {
|
||||||
|
@ -108,6 +108,34 @@
|
|||||||
<key>PostNotification</key>
|
<key>PostNotification</key>
|
||||||
<string>com.yaypixxo.kage/preferences.changed</string>
|
<string>com.yaypixxo.kage/preferences.changed</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<!--<dict>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSSwitchCell</string>
|
||||||
|
<key>default</key>
|
||||||
|
<false/>
|
||||||
|
<key>defaults</key>
|
||||||
|
<string>com.yaypixxo.kage</string>
|
||||||
|
<key>key</key>
|
||||||
|
<string>hideStatusBarLS</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>Hide LS Status Bar</string>
|
||||||
|
<key>PostNotification</key>
|
||||||
|
<string>com.yaypixxo.kage/preferences.changed</string>
|
||||||
|
</dict>-->
|
||||||
|
<dict>
|
||||||
|
<key>cell</key>
|
||||||
|
<string>PSSwitchCell</string>
|
||||||
|
<key>default</key>
|
||||||
|
<false/>
|
||||||
|
<key>defaults</key>
|
||||||
|
<string>com.yaypixxo.kage</string>
|
||||||
|
<key>key</key>
|
||||||
|
<string>hideCCGrabber</string>
|
||||||
|
<key>label</key>
|
||||||
|
<string>Hide CC Grabber (iPhone X)</string>
|
||||||
|
<key>PostNotification</key>
|
||||||
|
<string>com.yaypixxo.kage/preferences.changed</string>
|
||||||
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>cell</key>
|
<key>cell</key>
|
||||||
<string>PSGroupCell</string>
|
<string>PSGroupCell</string>
|
||||||
|
Reference in New Issue
Block a user