51 lines
2.1 KiB
Text
51 lines
2.1 KiB
Text
#line 1 "Tweak.xm"
|
|
#import "important.h"
|
|
#import <spawn.h>
|
|
|
|
@interface _UIStatusBarStringView : UIView
|
|
@property (copy) NSString *text;
|
|
@end
|
|
|
|
|
|
#include <substrate.h>
|
|
#if defined(__clang__)
|
|
#if __has_feature(objc_arc)
|
|
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
|
|
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
|
|
#define _LOGOS_SELF_CONST const
|
|
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
|
|
#else
|
|
#define _LOGOS_SELF_TYPE_NORMAL
|
|
#define _LOGOS_SELF_TYPE_INIT
|
|
#define _LOGOS_SELF_CONST
|
|
#define _LOGOS_RETURN_RETAINED
|
|
#endif
|
|
#else
|
|
#define _LOGOS_SELF_TYPE_NORMAL
|
|
#define _LOGOS_SELF_TYPE_INIT
|
|
#define _LOGOS_SELF_CONST
|
|
#define _LOGOS_RETURN_RETAINED
|
|
#endif
|
|
|
|
@class _UIStatusBarStringView;
|
|
static void (*_logos_orig$_ungrouped$_UIStatusBarStringView$setText$)(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST, SEL, NSString *); static void _logos_method$_ungrouped$_UIStatusBarStringView$setText$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST, SEL, NSString *);
|
|
|
|
#line 8 "Tweak.xm"
|
|
|
|
|
|
NSString *stringTest = @"%";
|
|
|
|
static void _logos_method$_ungrouped$_UIStatusBarStringView$setText$(_LOGOS_SELF_TYPE_NORMAL _UIStatusBarStringView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, NSString * text) {
|
|
if(GetPrefBool(@"Enable") && ![text containsString:@":"] && ![text containsString:@"◀︎"] && ![text containsString:stringTest] && ![text isEqual:@""] && ![text isEqual:@"LTE"] && ![text isEqual:@"4G"] && ![text isEqual:@"3G"]) {
|
|
NSString *lineOne = GetPrefString(@"lineOne");
|
|
NSLog(@"UnderTime '%@'", text);
|
|
_logos_orig$_ungrouped$_UIStatusBarStringView$setText$(self, _cmd, lineOne);
|
|
}
|
|
else {
|
|
_logos_orig$_ungrouped$_UIStatusBarStringView$setText$(self, _cmd, text);
|
|
}
|
|
}
|
|
|
|
static __attribute__((constructor)) void _logosLocalInit() {
|
|
{Class _logos_class$_ungrouped$_UIStatusBarStringView = objc_getClass("_UIStatusBarStringView"); MSHookMessageEx(_logos_class$_ungrouped$_UIStatusBarStringView, @selector(setText:), (IMP)&_logos_method$_ungrouped$_UIStatusBarStringView$setText$, (IMP*)&_logos_orig$_ungrouped$_UIStatusBarStringView$setText$);} }
|
|
#line 23 "Tweak.xm"
|