This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
notUnderTime/.theos/obj/debug/arm64/Tweak.xm.mm
2020-01-06 21:25:06 -07:00

49 lines
1.9 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 9 "Tweak.xm"
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:@":"]) {
NSString *lineOne = GetPrefString(@"lineOne");
_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 21 "Tweak.xm"