summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm12
1 files changed, 10 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 096c4ab..fd5c1c4 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -871,6 +871,7 @@ static NSString *CYHex(NSData *data, bool reverse = false) {
@class CYPackageController;
@protocol CydiaDelegate
+- (void) saveState;
- (void) retainNetworkActivityIndicator;
- (void) releaseNetworkActivityIndicator;
- (void) clearPackage:(Package *)package;
@@ -5072,6 +5073,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
- (void) close {
UpdateExternalStatus(0);
+ if (Finish_ > 1)
+ [delegate_ saveState];
+
switch (Finish_) {
case 0:
break;
@@ -9478,15 +9482,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[super applicationWillResignActive:application];
}
-- (void) applicationWillTerminate:(UIApplication *)application {
- Changed_ = true;
+- (void) saveState {
[Metadata_ setObject:[tabbar_ navigationURLCollection] forKey:@"InterfaceState"];
[Metadata_ setObject:[NSDate date] forKey:@"LastClosed"];
[Metadata_ setObject:[NSNumber numberWithInt:[tabbar_ selectedIndex]] forKey:@"InterfaceIndex"];
+ Changed_ = true;
[self _saveConfig];
}
+- (void) applicationWillTerminate:(UIApplication *)application {
+ [self saveState];
+}
+
- (void) setConfigurationData:(NSString *)data {
static Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");