diff --git a/KAIBattery.mm b/KAIBattery.mm index 1a772c5..1d34a64 100644 --- a/KAIBattery.mm +++ b/KAIBattery.mm @@ -89,6 +89,7 @@ long long lastPercentage; //Panik } } + [KAIBatteryCell resetArray]; //self.displayingDevices = [[NSMutableArray alloc] init]; diff --git a/KAIBatteryCell.h b/KAIBatteryCell.h index 08c6ce6..5dc1e0a 100644 --- a/KAIBatteryCell.h +++ b/KAIBatteryCell.h @@ -37,4 +37,5 @@ -(instancetype)initWithFrame:(CGRect)arg1 device:(BCBatteryDevice *)device; -(void)updateInfo; +(instancetype)cellForDeviceIfExists:(BCBatteryDevice *)device frameToCreateNew:(CGRect)arg2; ++(void)resetArray; @end \ No newline at end of file diff --git a/KAIBatteryCell.mm b/KAIBatteryCell.mm index 16e408b..cc5ab2d 100644 --- a/KAIBatteryCell.mm +++ b/KAIBatteryCell.mm @@ -164,8 +164,8 @@ NSMutableArray *deviceInstances = [[NSMutableArray alloc] init]; //return deviceInstances; } -+(id)array { - return deviceInstances; ++(void)resetArray { + deviceInstances = [[NSMutableArray alloc] init]; } @end \ No newline at end of file