mirror of
				https://github.com/Burrit0z/kai
				synced 2025-11-04 10:56:19 +00:00 
			
		
		
		
	95%
This commit is contained in:
		@ -82,11 +82,21 @@ long long lastPercentage;
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-(void)refreshForPrefs {
 | 
					-(void)refreshForPrefs {
 | 
				
			||||||
 | 
					    for( UIView *view in self.subviews ) {
 | 
				
			||||||
 | 
					        @try {
 | 
				
			||||||
 | 
					            [view removeFromSuperview];
 | 
				
			||||||
 | 
					        } @catch (NSException *exception) {
 | 
				
			||||||
 | 
					            //Panik
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance];
 | 
					    BCBatteryDeviceController *bcb = [BCBatteryDeviceController sharedInstance];
 | 
				
			||||||
        NSArray *devices = MSHookIvar<NSArray *>(bcb, "_sortedDevices");
 | 
					        NSArray *devices = MSHookIvar<NSArray *>(bcb, "_sortedDevices");
 | 
				
			||||||
    for(BCBatteryDevice *device in devices) {
 | 
					    for(BCBatteryDevice *device in devices) {
 | 
				
			||||||
        [device resetKaiCellForNewPrefs];
 | 
					        [device resetKaiCellForNewPrefs];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    [self updateBattery];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
+(KAIBatteryStack *)sharedInstance {
 | 
					+(KAIBatteryStack *)sharedInstance {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user