|
|
|
|
|
|
|
|
//static BOOL hideStatusBarLS; |
|
|
//static BOOL hideStatusBarLS; |
|
|
static BOOL hideCCGrabber; |
|
|
static BOOL hideCCGrabber; |
|
|
static BOOL noBetaAlert; |
|
|
static BOOL noBetaAlert; |
|
|
|
|
|
static BOOL tapFolderClose; |
|
|
|
|
|
|
|
|
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]; |
|
|
|
|
|
|
|
|
//NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString]; |
|
|
//NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString]; |
|
|
NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString]; |
|
|
NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString]; |
|
|
NSNumber *eNoBetaAlert = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"noBetaAlert" inDomain:nsDomainString]; |
|
|
NSNumber *eNoBetaAlert = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"noBetaAlert" inDomain:nsDomainString]; |
|
|
|
|
|
NSNumber *eTapFolderClose = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"tapFolderClose" inDomain:nsDomainString]; |
|
|
|
|
|
|
|
|
enabled = (eEnabled) ? [eEnabled boolValue]:NO; |
|
|
enabled = (eEnabled) ? [eEnabled boolValue]:NO; |
|
|
hideQuickActionsBG = (eHideQuickActionsBG) ? [eHideQuickActionsBG boolValue]:NO; |
|
|
hideQuickActionsBG = (eHideQuickActionsBG) ? [eHideQuickActionsBG boolValue]:NO; |
|
|
|
|
|
|
|
|
//hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO; |
|
|
//hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO; |
|
|
hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO; |
|
|
hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO; |
|
|
noBetaAlert = (eNoBetaAlert) ? [eNoBetaAlert boolValue]:NO; |
|
|
noBetaAlert = (eNoBetaAlert) ? [eNoBetaAlert boolValue]:NO; |
|
|
|
|
|
tapFolderClose = (eTapFolderClose) ? [eTapFolderClose boolValue]:NO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Headers |
|
|
// Headers |
|
|
#import <UIKit/UIKit.h> |
|
|
#import <UIKit/UIKit.h> |
|
|
|
|
|
|
|
|
/*@interface SBFolderView : UIView |
|
|
|
|
|
@end*/ |
|
|
|
|
|
|
|
|
@interface SBFloatyFolderView : UIView |
|
|
|
|
|
@end |
|
|
|
|
|
|
|
|
@interface SBIconView : UIView |
|
|
@interface SBIconView : UIView |
|
|
-(void)setLabelHidden:(BOOL)hidden; |
|
|
-(void)setLabelHidden:(BOOL)hidden; |
|
|
|
|
|
|
|
|
%end |
|
|
%end |
|
|
|
|
|
|
|
|
// Close folder when tapped inside |
|
|
// Close folder when tapped inside |
|
|
/*%hook SBFloatyFolderScrollView |
|
|
|
|
|
-(SBFloatyFolderScrollView *)initWithFrame:(CGRect)frame { |
|
|
|
|
|
if (enabled && hideFolderBG) { |
|
|
|
|
|
SBFloatyFolderScrollView *yeet = %orig; |
|
|
|
|
|
|
|
|
|
|
|
UITapGestureRecognizer *closeGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeFolder)]; |
|
|
|
|
|
|
|
|
|
|
|
[yeet addGestureRecognizer:closeGesture]; |
|
|
|
|
|
|
|
|
|
|
|
return yeet; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
return %orig; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
%new |
|
|
|
|
|
-(void)closeFolder:(id)sender { |
|
|
|
|
|
UIViewController *parentController = [self _viewControllerForAncestor]; |
|
|
|
|
|
|
|
|
|
|
|
if ([parentController isKindOfClass:[objc_getClass("SBFolderController") class]]) { |
|
|
|
|
|
SBFolderController *sbfc = (SBFolderController *)parentController; |
|
|
|
|
|
|
|
|
|
|
|
if (sbfc && [sbfc.containerView isKindOfClass:[objc_getClass("SBFloatyFolderView") class]]) { |
|
|
|
|
|
[(SBFloatyFolderView *)sbfc.containerView _handleOutsideTap:nil]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
%hook SBFloatyFolderView |
|
|
|
|
|
-(void)_tapToCloseGestureRecognizer:(id)arg1 shouldReceiveTouch:(id)arg2 { |
|
|
|
|
|
%orig; |
|
|
|
|
|
if (enabled && tapFolderClose) { |
|
|
|
|
|
return YES; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
return %orig; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
%end*/ |
|
|
|
|
|
|
|
|
%end |
|
|
|
|
|
|
|
|
// Hide folder dots |
|
|
// Hide folder dots |
|
|
%hook SBIconListPageControl |
|
|
%hook SBIconListPageControl |