]> git.saurik.com Git - safemode-ios.git/commitdiff
On iOS 7, fix Exit Safe Mode text (parrotgeek1).
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 15 Jan 2014 12:27:27 +0000 (04:27 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 15 Jan 2014 12:28:26 +0000 (04:28 -0800)
Tweak.xm

index 69a6d27a53ec0237a2e89d0678306c0accad2052..cbab28d24c4cf9820e1d4dc47947244c2d03c41c 100644 (file)
--- a/Tweak.xm
+++ b/Tweak.xm
@@ -170,6 +170,32 @@ static void MSAlert() {
 } %end
 
 
+// this /insanely/ complex code came from that parrot guy... omg this is getting bad
+
+@interface SBStatusBarStateAggregator : NSObject
+- (void) _stopTimeItemTimer;
+@end
+
+%hook SBStatusBarStateAggregator
+
+- (void) _updateTimeItems {
+    if ([self respondsToSelector:@selector(_stopTimeItemTimer)])
+        [self _stopTimeItemTimer];
+    %orig;
+}
+
+- (void) _restartTimeItemTimer {
+}
+
+- (void) _resetTimeItemFormatter {
+    %orig;
+    if (NSDateFormatter *df = MSHookIvar<NSDateFormatter *>(self, "_timeItemDateFormatter"))
+        [df setDateFormat:@"'Exit' 'Safe' 'Mode'"];
+}
+
+%end
+
+
 static bool alerted_;
 
 static void AlertIfNeeded() {