1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-04 14:36:47 +00:00

so close to beta 1

This commit is contained in:
Burrit0z
2020-05-24 19:06:27 -04:00
parent e937a735c6
commit 00de4d98ba
6 changed files with 33 additions and 55 deletions

View File

@ -1,7 +1,5 @@
#import "KAIBatteryCell.h"
NSMutableArray *deviceInstances = [[NSMutableArray alloc] init];
@implementation KAIBatteryCell
-(instancetype)initWithFrame:(CGRect)arg1 device:(BCBatteryDevice *)device {
@ -113,7 +111,6 @@ NSMutableArray *deviceInstances = [[NSMutableArray alloc] init];
[self.battery.widthAnchor constraintEqualToConstant:20].active = YES;
[self.battery.heightAnchor constraintEqualToConstant:10].active = YES;
[deviceInstances addObject:self];
}
return self;
@ -166,28 +163,4 @@ NSMutableArray *deviceInstances = [[NSMutableArray alloc] init];
}
+(instancetype)cellForDeviceIfExists:(BCBatteryDevice *)device frameToCreateNew:(CGRect)arg2 {
KAIBatteryCell *foundCell;
//NSString *deviceName = MSHookIvar<NSString *>(device, "_name");
for(KAIBatteryCell *cell in deviceInstances) {
if(cell.device == device || [cell.device.identifier isEqualToString:device.identifier]) {
foundCell = cell;
break;
}
}
if(foundCell == nil) {
foundCell = [[KAIBatteryCell alloc] initWithFrame:arg2 device:device];
}
return foundCell;
//return deviceInstances;
}
+(void)resetArray {
deviceInstances = [[NSMutableArray alloc] init];
}
@end