diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7a3d92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +debs/ +obj/ +_/ +.theos/ +theos/ diff --git a/Elite.plist b/Elite.plist new file mode 100644 index 0000000..7a7fd62 --- /dev/null +++ b/Elite.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.mobilephone" ); }; } diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a9910d --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +ARCHS = armv7 armv7s arm64 +include theos/makefiles/common.mk + +TWEAK_NAME = Elite +Elite_FILES = Tweak.xm +Elite_FRAMEWORKS = UIKit +TARGET := iphone:8.0:8.0 + +include $(THEOS_MAKE_PATH)/tweak.mk + +after-install:: + install.exec "killall -9 MobilePhone" diff --git a/Tweak.xm b/Tweak.xm new file mode 100644 index 0000000..48db69c --- /dev/null +++ b/Tweak.xm @@ -0,0 +1,38 @@ +#import + +@interface CHRecentCall : NSObject +@property unsigned int callStatus; +@end + +@interface PHRecentsCell : UITableViewCell { + UILabel* _callerNameLabel; + CHRecentCall* _call; +} +-(void)setEditing:(BOOL)arg1 animated:(BOOL)arg2; +@end + +%hook PHRecentsCell + +//yea probably not the best place to do this +-(void)setEditing:(BOOL)arg1 animated:(BOOL)arg2 { + + UILabel *nameLabel = MSHookIvar(self, "_callerNameLabel"); + CHRecentCall *callInfo = MSHookIvar(self, "_call"); + + //incoming call : 1 + //answered elsewhere (another device) : 4 + if (callInfo.callStatus == 1 || callInfo.callStatus == 4) { + nameLabel.textColor = [UIColor colorWithRed:36.0/255.0 green:87.0/255.0 blue:156.0/255.0 alpha:1]; + } else + + //outgoing call : 2 + //cancelled (??) : 16 + if (callInfo.callStatus == 2 || callInfo.callStatus == 16) { + nameLabel.textColor = [UIColor colorWithRed:0.0/255.0 green:125.0/255.0 blue:0.0/255.0 alpha:1]; + } else { + nameLabel.textColor = [UIColor colorWithRed:218.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:1]; + } + + %orig; +} +%end \ No newline at end of file diff --git a/control b/control new file mode 100644 index 0000000..e1d0f22 --- /dev/null +++ b/control @@ -0,0 +1,10 @@ +Package: com.leftyfl1p.elite +Name: Elite +Depends: mobilesubstrate +Version: 0.0.1 +Architecture: iphoneos-arm +Description: An awesome MobileSubstrate tweak! +Maintainer: leftyfl1p +Author: leftyfl1p +Section: Tweaks +Depiction: https://leftyfl1p.github.io/depictions/?p=com.leftyfl1p.elite