Skip to content

Commit

Permalink
Remove isViewDidLoad and replace by createInfo-internal check
Browse files Browse the repository at this point in the history
  • Loading branch information
wutschel committed May 18, 2024
1 parent 308c100 commit 8337af1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion XBMC Remote/ShowInfoViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
UIColor *foundTintColor;
UILabel *viewTitle;
__weak IBOutlet UIImageView *bottomShadow;
BOOL isViewDidLoad;
UIImageView *isRecording;
LogoBackgroundType logoBackgroundMode;
UIBarButtonItem *doneButton;
Expand Down
10 changes: 5 additions & 5 deletions XBMC Remote/ShowInfoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ - (void)setIOS7barTintColor:(UIColor*)tintColor {
}

- (void)createInfo {
// Use mainLabel0 to check, if the info view already has been created
if (mainLabel0) {
return;
}
// NEED TO BE OPTIMIZED. IT WORKS BUT THERE ARE TOO MANY IFS!
NSMutableDictionary *item = self.detailItem;
NSString *placeHolderImage = @"coverbox_back";
Expand Down Expand Up @@ -1874,10 +1878,7 @@ - (void)viewWillAppear:(BOOL)animated {
viewTitle.textAlignment = NSTextAlignmentCenter;
bottomShadow.hidden = YES;
}
if (isViewDidLoad) {
[self createInfo];
isViewDidLoad = NO;
}
[self createInfo];
}

- (void)viewDidAppear:(BOOL)animated {
Expand Down Expand Up @@ -1949,7 +1950,6 @@ - (void)disableScrollsToTopPropertyOnAllSubviewsOf:(UIView*)view {

- (void)viewDidLoad {
[super viewDidLoad];
isViewDidLoad = YES;
fanartView.tag = FANART_FULLSCREEN_DISABLE;
fanartView.userInteractionEnabled = YES;
UITapGestureRecognizer *touchOnKenView = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showBackground:)];
Expand Down

0 comments on commit 8337af1

Please sign in to comment.