From: Jay Freeman (saurik) Date: Fri, 24 Jan 2014 13:27:32 +0000 (-0800) Subject: Support background-only configurations on old iOS. X-Git-Tag: v0.9.4009~15 X-Git-Url: https://git.saurik.com/cydget.git/commitdiff_plain/7c87949df3894921cd7bf49cb66f16df9d695ff6 Support background-only configurations on old iOS. --- diff --git a/LockScreen.mm b/LockScreen.mm index b845093..c039c09 100644 --- a/LockScreen.mm +++ b/LockScreen.mm @@ -1135,11 +1135,15 @@ static void $UIWebViewWebViewDelegate$webView$didClearWindowObject$forFrame$(UIW } - (void) loadView { - if (NSString *homepage = [configuration_ objectForKey:@"Homepage"]) - [self setView:[[[WebCydgetLockScreenView alloc] initWithURL:[NSURL URLWithString:homepage]] autorelease]]; - if (NSString *background = [configuration_ objectForKey:@"Background"]) background_ = [[WebCydgetLockScreenView alloc] initWithURL:[NSURL URLWithString:background]]; + + if (NSString *homepage = [configuration_ objectForKey:@"Homepage"]) + [self setView:[[[WebCydgetLockScreenView alloc] initWithURL:[NSURL URLWithString:homepage]] autorelease]]; + else if (kCFCoreFoundationVersionNumber < 800 && background_ != nil) { + [self setView:[background_ autorelease]]; + background_ = nil; + } } - (void) purgeView {