From 6988072fa368fcc586031eaf4988664803e5f7cc Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Sun, 24 May 2020 19:11:29 -0400 Subject: [PATCH] 95% --- KAIBatteryStack.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/KAIBatteryStack.mm b/KAIBatteryStack.mm index cff0247..9263f3d 100644 --- a/KAIBatteryStack.mm +++ b/KAIBatteryStack.mm @@ -82,11 +82,21 @@ long long lastPercentage; } -(void)refreshForPrefs { + for( UIView *view in self.subviews ) { + @try { + [view removeFromSuperview]; + } @catch (NSException *exception) { + //Panik + } + } + BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance]; NSArray *devices = MSHookIvar(bcb, "_sortedDevices"); for(BCBatteryDevice *device in devices) { [device resetKaiCellForNewPrefs]; } + + [self updateBattery]; } +(KAIBatteryStack *)sharedInstance {