Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
leftyfl1p committed Jul 22, 2015
0 parents commit f33dc5a
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
debs/
obj/
_/
.theos/
theos/
1 change: 1 addition & 0 deletions Elite.plist
@@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.mobilephone" ); }; }
12 changes: 12 additions & 0 deletions 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"
38 changes: 38 additions & 0 deletions Tweak.xm
@@ -0,0 +1,38 @@
#import <UIKit/UIKit.h>

@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<UILabel *>(self, "_callerNameLabel");
CHRecentCall *callInfo = MSHookIvar<CHRecentCall *>(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
10 changes: 10 additions & 0 deletions 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

0 comments on commit f33dc5a

Please sign in to comment.