diff --git a/KAIBatteryCell.mm b/KAIBatteryCell.mm index 0ad49e0..0a0c1b6 100755 --- a/KAIBatteryCell.mm +++ b/KAIBatteryCell.mm @@ -76,9 +76,12 @@ } UIImage *glyph = ios13 ? [device glyph] : [device batteryWidgetGlyph]; + + glyph= [glyph imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; self.glyphView = [[UIImageView alloc] init]; self.glyphView.contentMode = UIViewContentModeScaleAspectFit; [self.glyphView setImage:glyph]; + self.glyphView.tintColor = [UIColor whiteColor]; [self addSubview:blurPlatter]; [blurPlatter addSubview:blur]; @@ -218,9 +221,6 @@ } [self.percentLabel setText:[NSString stringWithFormat:@"%ld%%", (long)((NSInteger)batteryPercentage)]]; self.battery.chargePercent = (batteryPercentage * 0.01); - - [self.glyphView setImage:ios13 ? [self.device glyph] : [self.device batteryWidgetGlyph]]; - } else { } } diff --git a/KAIBatteryPlatter.mm b/KAIBatteryPlatter.mm index e6e3972..ab1c47e 100755 --- a/KAIBatteryPlatter.mm +++ b/KAIBatteryPlatter.mm @@ -100,7 +100,7 @@ NSMutableArray *cellsForDeviceNames = [[NSMutableArray alloc] init]; - (void)updateBattery { dispatch_async(dispatch_get_main_queue(), ^{ BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance]; - NSArray *devices = ios13 ? [bcb sortedDevices] : [bcb connectedDevices]; + NSArray *devices = [bcb connectedDevices]; if (self.oldCountOfDevices == -100) { self.oldCountOfDevices = [devices count] + 1; @@ -311,7 +311,7 @@ NSMutableArray *cellsForDeviceNames = [[NSMutableArray alloc] init]; } BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance]; - NSArray *devices = ios13 ? [bcb sortedDevices] : [bcb connectedDevices]; + NSArray *devices = [bcb connectedDevices]; for (BCBatteryDevice *device in devices) { [device resetKaiCellForNewPrefs]; } diff --git a/KAIClassHeaders.h b/KAIClassHeaders.h index f0aab9f..bfb058a 100644 --- a/KAIClassHeaders.h +++ b/KAIClassHeaders.h @@ -19,8 +19,7 @@ @interface BCBatteryDeviceController : NSObject @property (nonatomic, strong) NSArray *sortedDevices; -- (id)_sortedDevices; -- (id)connectedDevices; //ios 14 +- (id)connectedDevices; + (id)sharedInstance; @end