From: Jay Freeman (saurik) Date: Thu, 2 Dec 2010 12:49:05 +0000 (-0800) Subject: Remove 1.x-compatible ApplicationIconBadge logic. X-Git-Tag: v1.1.0%b1~429 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/0e1784b407f7de937a24bcf2fc5a2d9ef825f7bf Remove 1.x-compatible ApplicationIconBadge logic. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 267fa21b..872e818c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8210,24 +8210,20 @@ static _finline void _setHomePage(Cydia *self) { } } + NSLog(@"changes:#%u", changes); + UITabBarItem *changesItem = [[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kChangesTag]] tabBarItem]; if (changes != 0) { + _trace(); NSString *badge([[NSNumber numberWithInt:changes] stringValue]); [changesItem setBadgeValue:badge]; [changesItem setAnimatedBadge:([essential_ count] > 0)]; - - if ([self respondsToSelector:@selector(setApplicationBadge:)]) - [self setApplicationBadge:badge]; - else - [self setApplicationBadgeString:badge]; + [self setApplicationIconBadgeNumber:changes]; } else { + _trace(); [changesItem setBadgeValue:nil]; [changesItem setAnimatedBadge:NO]; - - if ([self respondsToSelector:@selector(removeApplicationBadge)]) - [self removeApplicationBadge]; - else // XXX: maybe use setApplicationBadgeString also? - [self setApplicationIconBadgeNumber:0]; + [self setApplicationIconBadgeNumber:0]; } [self _updateData]; diff --git a/iPhonePrivate.h b/iPhonePrivate.h index afb4a34d..e6a79dce 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -195,9 +195,6 @@ typedef enum { - (void) applicationWillResignActive:(UIApplication *)application; - (void) applicationWillSuspend; - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended; -- (void) removeApplicationBadge; -- (void) setApplicationBadge:(NSString *)badge; -- (void) setApplicationBadgeString:(NSString *)badge; - (void) setStatusBarShowsProgress:(BOOL)shows; - (void) _setSuspended:(BOOL)suspended; - (void) terminateWithSuccess;