From 7c87949df3894921cd7bf49cb66f16df9d695ff6 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 24 Jan 2014 05:27:32 -0800 Subject: [PATCH] Support background-only configurations on old iOS. --- LockScreen.mm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 { -- 2.45.2