2
1
鏡像自 https://github.com/gilshahar7/ExactTimePhone.git 已同步 2025-12-14 21:07:17 +00:00

Add files via upload

此提交包含在:
2019-07-13 16:02:13 +03:00
提交者 GitHub
父節點 47895bc073
當前提交 e27f4f12be
共有 5 個檔案被更改,包括 62 行新增0 行删除

1
ExactTimePhone.plist 一般檔案
查看文件

@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.mobilephone" ); }; }

12
Makefile 一般檔案
查看文件

@ -0,0 +1,12 @@
export ARCHS = armv7 arm64
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = ExactTimePhone
ExactTimePhone_FILES = Tweak.xm
ExactTimePhone_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 MobilePhone"

40
Tweak.xm 一般檔案
查看文件

@ -0,0 +1,40 @@
@interface UIDateLabel : UILabel
@property (nonatomic, strong) NSDate *date;
@end
@interface MPRecentsTableViewCell
@property (nonatomic, strong) UIDateLabel *callerDateLabel;
@end
static bool is24h;
%hook MPRecentsTableViewCell
-(void)layoutSubviews{
%orig;
if(![self.callerDateLabel.text containsString:@":"]){
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
if(is24h){
[dateFormatter setDateFormat:@"\nHH:mm"];
}else{
[dateFormatter setDateFormat:@"\nh:mm a"];
}
self.callerDateLabel.textAlignment = 2;
self.callerDateLabel.numberOfLines = 2;
self.callerDateLabel.text = [self.callerDateLabel.text stringByAppendingString:[dateFormatter stringFromDate:self.callerDateLabel.date]];
}
}
%end
%ctor{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setLocale:[NSLocale currentLocale]];
[formatter setDateStyle:NSDateFormatterNoStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
NSString *dateString = [formatter stringFromDate:[NSDate date]];
NSRange amRange = [dateString rangeOfString:[formatter AMSymbol]];
NSRange pmRange = [dateString rangeOfString:[formatter PMSymbol]];
is24h = (amRange.location == NSNotFound && pmRange.location == NSNotFound);
}

9
control 一般檔案
查看文件

@ -0,0 +1,9 @@
Package: com.gilshahar7.exacttimephone
Name: ExactTimePhone
Depends: mobilesubstrate
Version: 1.0
Architecture: iphoneos-arm
Description: Adds an exact time to the calls log in the stock phone app.
Maintainer: gilshahar7
Author: gilshahar7
Section: Tweaks

未顯示二進位檔案。