From 1aea9e9541beb8936ee2a0c8bbc98a3269fc6e53 Mon Sep 17 00:00:00 2001 From: Burrit0z Date: Tue, 2 Jun 2020 20:26:02 -0400 Subject: [PATCH] damn that bug --- KAIBatteryPlatter.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/KAIBatteryPlatter.mm b/KAIBatteryPlatter.mm index 0643caf..0c146f1 100755 --- a/KAIBatteryPlatter.mm +++ b/KAIBatteryPlatter.mm @@ -134,11 +134,15 @@ long long lastPercentage; } else { int height = (self.number * (bannerHeight + spacing)); - if(kaiAlign==0 && [self.superview.subviews count]>1) { - height = (self.number * (bannerHeight + spacing)) - spacing; + if(kaiAlign==0) { + height = (self.number * (bannerHeight + spacing)); } else { height = bannerHeight + spacing; } + + if([self.superview.subviews count]>1) { + height = height - spacing; + } self.heightConstraint.constant = height; self.stack.heightConstraint.constant = height;