1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-03 13:46:47 +00:00

soon fix, this still broke

This commit is contained in:
Burrit0z
2020-05-22 09:58:17 -04:00
parent b70d126fc7
commit 6aeb4cb375
6 changed files with 55 additions and 38 deletions

13
Kai.xm
View File

@ -6,16 +6,17 @@
-(void)_layoutStackView {
//NSInteger lastSlot = [[self stackView].subviews count] -1;
NSInteger lastSlot = [[self stackView].subviews count] -1;
//this code is used to determine if kai is at the bottom of the stack view
//if([[self stackView].subviews objectAtIndex:lastSlot] != [KAIBattery sharedInstance] && belowMusic) {
if([[self stackView].subviews objectAtIndex:lastSlot] != [KAIBattery sharedInstance] && belowMusic) {
//if it is not, but the option to have kai below music is on, i simply remove from it's current pos.
//and insert into last slot.
//[[self stackView] removeArrangedSubview:[KAIBattery sharedInstance]];
//[[self stackView] insertArrangedSubview:[KAIBattery sharedInstance] atIndex:lastSlot];
//}
[[self stackView] removeArrangedSubview:[KAIBattery sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBattery sharedInstance] atIndex:lastSlot];
}
//makes kai lay itself out when the stack does
NSLog(@"kai: laying out stack view");
[self KaiUpdate];
%orig;
@ -79,6 +80,8 @@
isUpdating = YES;
NSLog(@"kai: kai info will update");
[[KAIBattery sharedInstance] updateBattery];
[self KaiUpdate];