mirror of
				https://github.com/Burrit0z/kai
				synced 2025-11-04 05:06:19 +00:00 
			
		
		
		
	0.0.2
This commit is contained in:
		@ -46,7 +46,7 @@ long long lastPercentage;
 | 
				
			|||||||
                BOOL charging = MSHookIvar<long long>(device, "_charging");
 | 
					                BOOL charging = MSHookIvar<long long>(device, "_charging");
 | 
				
			||||||
                BOOL LPM = MSHookIvar<BOOL>(device, "_batterySaverModeActive");
 | 
					                BOOL LPM = MSHookIvar<BOOL>(device, "_batterySaverModeActive");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if(charging || !charging) {
 | 
					                if(charging) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    UIVisualEffectView *blank;
 | 
					                    UIVisualEffectView *blank;
 | 
				
			||||||
                    if(@available(iOS 12.0, *)) {
 | 
					                    if(@available(iOS 12.0, *)) {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										23
									
								
								Kai.xm
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								Kai.xm
									
									
									
									
									
								
							@ -96,13 +96,24 @@ CGRect originalBattery;
 | 
				
			|||||||
		//battery.heightConstraint.constant = (battery.number * 85);
 | 
							//battery.heightConstraint.constant = (battery.number * 85);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if(!battery.heightConstraint) {
 | 
							if(!battery.heightConstraint) {
 | 
				
			||||||
			NSLog(@"kai: 1st time, assigning to %ld", (battery.number * 85));
 | 
					 | 
				
			||||||
			battery.heightConstraint = [battery.heightAnchor constraintEqualToConstant:(battery.number * 85)];
 | 
					 | 
				
			||||||
			battery.heightConstraint.active = YES;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
		NSLog(@"kai: setting to %ld", (battery.number * 85));
 | 
								battery.heightConstraint.active = NO;
 | 
				
			||||||
		battery.heightConstraint.constant = (battery.number * 85);
 | 
								NSLog(@"kai: 1st time, assigning to %d", 500);
 | 
				
			||||||
 | 
								battery.heightConstraint = [battery.heightAnchor constraintEqualToConstant:500];
 | 
				
			||||||
 | 
								battery.heightConstraint.active = YES;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
							int height = (battery.number * 85);
 | 
				
			||||||
 | 
								if(height!=0) {
 | 
				
			||||||
 | 
									battery.heightConstraint.active = NO;
 | 
				
			||||||
 | 
									NSLog(@"kai: setting to %d", height);
 | 
				
			||||||
 | 
									battery.heightConstraint.constant = height;
 | 
				
			||||||
 | 
									battery.heightConstraint.active = YES;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									UIStackView *s = [self stackView];
 | 
				
			||||||
 | 
									s.frame = CGRectMake(s.frame.origin.x, s.frame.origin.y, s.frame.size.width, (s.frame.size.height - 1));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}];
 | 
						}];
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user