소스 검색

fix ora1n

pull/1/head
Burrit0z 4 년 전
부모
커밋
bd7c52f3ab
2개의 변경된 파일14개의 추가작업 그리고 13개의 파일을 삭제
  1. +13
    -12
      Kai.xm
  2. +1
    -1
      Layout/DEBIAN/control

+ 13
- 12
Kai.xm 파일 보기

@@ -97,21 +97,22 @@ CSAdjunctListView *list;
%hook BCBatteryDevice
%property (nonatomic, strong) KAIBatteryCell *kaiCell;

- (id)initWithIdentifier:(id)arg1 vendor:(long long)arg2 productIdentifier:(long long)arg3 parts:(unsigned long long)arg4 matchIdentifier:(id)arg5 {

//Posts a notification to self when these keys change
[self addObserver:self forKeyPath:@"charging" options:NSKeyValueObservingOptionNew context:nil];
[self addObserver:self forKeyPath:@"batterySaverModeActive" options:NSKeyValueObservingOptionNew context:nil];
[self addObserver:self forKeyPath:@"percentCharge" options:NSKeyValueObservingOptionNew context:nil];

return %orig;
-(void)setCharging:(BOOL)arg1 {
//sends the noti to update battery info
[[NSNotificationCenter defaultCenter] postNotificationName:@"KaiInfoChanged" object:nil userInfo:nil];
%orig;
}

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
-(void)setBatterySaverModeActive:(BOOL)arg1 {
//sends the noti to update battery info
[[NSNotificationCenter defaultCenter] postNotificationName:@"KaiInfoChanged" object:nil userInfo:nil];
%orig;
}

//sends the noti to update battery info
[[NSNotificationCenter defaultCenter] postNotificationName:@"KaiInfoChanged" object:nil userInfo:nil];
-(void)setPercentCharge:(NSInteger)arg1 {
//sends the noti to update battery info
[[NSNotificationCenter defaultCenter] postNotificationName:@"KaiInfoChanged" object:nil userInfo:nil];
%orig;
}

%new

+ 1
- 1
Layout/DEBIAN/control 파일 보기

@@ -1,6 +1,6 @@
Package: com.burritoz.kai
Name: Kai
Version: 0.9.95
Version: 0.9.96
Architecture: iphoneos-arm
Description: Device battery indicators on your lock screen!
Maintainer: burrit0z

Loading…
취소
저장