Kaynağa Gözat

fix this :)

pull/1/head
Burrit0z 4 yıl önce
ebeveyn
işleme
09bfc1073f
5 değiştirilmiş dosya ile 21 ekleme ve 25 silme
  1. +0
    -13
      KAIBatteryPlatter.h
  2. +2
    -2
      KAIBatteryPlatter.mm
  3. +14
    -0
      KAIStackView.h
  4. +5
    -0
      KAIStackView.mm
  5. +0
    -10
      Kai.xm

+ 0
- 13
KAIBatteryPlatter.h Dosyayı Görüntüle

@@ -1,13 +0,0 @@
@interface KAIBatteryPlatter : UIScrollView <UIScrollViewDelegate>
@property (nonatomic, assign) NSInteger number;
@property (nonatomic, assign) NSInteger oldCountOfDevices;
@property (nonatomic, strong) NSLayoutConstraint *heightConstraint;
@property (nonatomic, strong) KAIStackView *stack;
@property (nonatomic, assign) BOOL isUpdating;
@property (nonatomic, assign) BOOL queued;
+(KAIBatteryPlatter *)sharedInstance;
-(instancetype)initWithFrame:(CGRect)arg1;
-(void)refreshForPrefs;
-(void)updateBattery;
-(void)calculateHeight;
@end

+ 2
- 2
KAIBatteryPlatter.mm Dosyayı Görüntüle

@@ -1,4 +1,3 @@
#import "KAIBatteryPlatter.h"

KAIBatteryPlatter *instance;
NSTimer *queueTimer = nil;
@@ -192,7 +191,8 @@ long long lastPercentage;
if(self.number==0) {
[(UIStackView *)(self.superview) removeArrangedSubview:self];
} else if(self.number!=0 && !self.superview) {
[[[objc_getClass("CSAdjunctListView") class] sharedListViewForKai] addArrangedSubview:self];
[[[[objc_getClass("CSAdjunctListView") class] sharedListViewForKai] stackView] addArrangedSubview:self];
[self performSelector:@selector(calculateHeight) withObject:self afterDelay:0.1];
}
}


+ 14
- 0
KAIStackView.h Dosyayı Görüntüle

@@ -1,3 +1,17 @@
@interface KAIStackView : UIStackView
@property (nonatomic, strong) NSLayoutConstraint *heightConstraint;
@end

@interface KAIBatteryPlatter : UIScrollView <UIScrollViewDelegate>
@property (nonatomic, assign) NSInteger number;
@property (nonatomic, assign) NSInteger oldCountOfDevices;
@property (nonatomic, strong) NSLayoutConstraint *heightConstraint;
@property (nonatomic, strong) KAIStackView *stack;
@property (nonatomic, assign) BOOL isUpdating;
@property (nonatomic, assign) BOOL queued;
+(KAIBatteryPlatter *)sharedInstance;
-(instancetype)initWithFrame:(CGRect)arg1;
-(void)refreshForPrefs;
-(void)updateBattery;
-(void)calculateHeight;
@end

+ 5
- 0
KAIStackView.mm Dosyayı Görüntüle

@@ -13,4 +13,9 @@
[(UIScrollView *)self.superview setContentSize:self.frame.size];
}

-(void)layoutSubviews {
[super layoutSubviews];
[(KAIBatteryPlatter *)(self.superview) calculateHeight];
}

@end

+ 0
- 10
Kai.xm Dosyayı Görüntüle

@@ -31,16 +31,6 @@ CSAdjunctListView *list;
%orig;
}

-(void)removeArrangedSubview:(id)arg1 {
%orig;
[[KAIBatteryPlatter sharedInstance] calculateHeight];
}

-(void)addArrangedSubview:(id)arg1 {
%orig;
[[KAIBatteryPlatter sharedInstance] calculateHeight];
}

-(void)setStackView:(UIStackView *)arg1 {

if(!KAISelf.hasKai) {

Yükleniyor…
İptal
Kaydet