Skip to content

Commit

Permalink
updated hiding icons for iOS5 fixing the safe mode issue when doing l…
Browse files Browse the repository at this point in the history
…ive updates.
  • Loading branch information
big-boss committed Oct 13, 2011
1 parent 6c08879 commit e79f76d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion dylib/classes/iconhide.xm
Expand Up @@ -64,6 +64,7 @@ NSLog(@"[%@ %s] bt=%x", [[self class] description], sel_getName(sel), bt); \

@interface SBIconModel : NSObject
- (void)setVisibilityOfIconsWithVisibleTags:(id)visibleTags hiddenTags:(id)tags;
- (void)relayout;
@end
@interface SBIconModel (Firmware2x3x)
@property(readonly, retain) NSMutableArray *iconLists;
Expand Down Expand Up @@ -208,7 +209,7 @@ static bool global_switcherShowing = NO;

if(global_switcherShowing == NO)
{
if(SYS_VER_4(global_SystemVersion))
if(global_SystemVersion >= 4.0f)
{
//return %orig;
if(global_SearchController != nil)
Expand Down Expand Up @@ -431,6 +432,25 @@ static void IconHide_HiddenIconsChanged(CFNotificationCenterRef center,
[theApp relaunchSpringBoard];
}
}

else if([[[UIDevice currentDevice] systemVersion] hasPrefix:@"5."])
{
LoadHiddenIconList();

Class SBIconModel = objc_getClass("SBIconModel");
SBIconModel* iconModel = (SBIconModel*)[SBIconModel sharedInstance];
NSSet** _visibleIconTags = (NSSet**)MSHookIvar(iconModel, "_visibleIconTags");
NSSet** _hiddenIconTags = (NSSet**)MSHookIvar(iconModel, "_hiddenIconTags");
if(*_visibleIconTags != NULL && *_hiddenIconTags != NULL &&
_visibleIconTags != NULL && _hiddenIconTags!=NULL)
{
global_Rehide = YES;
NSSet* visibleIconTags = [NSSet setWithSet:*_visibleIconTags];
NSSet* hiddenIconTags = [NSSet setWithSet:*_hiddenIconTags];
[iconModel setVisibilityOfIconsWithVisibleTags:visibleIconTags hiddenTags:hiddenIconTags];
[iconModel relayout];
}
}

else
{
Expand Down

0 comments on commit e79f76d

Please sign in to comment.