Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit cb0dcc4

Browse files
committed
add comments and yank out unused function
1 parent 834bb51 commit cb0dcc4

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

CodePush.m

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,16 @@ - (instancetype)init
113113
self = [super init];
114114

115115
if (self) {
116-
// Do a check to see whether we need to start the rollback timer
117-
// due to a pending update being installed at start
118116
[self initializeUpdateAfterRestart];
119117
}
120118

121119
return self;
122120
}
123121

122+
/*
123+
* This method starts the rollback protection timer
124+
* and is used when a new update is initialized.
125+
*/
124126
- (void)initializeUpdateAfterRestart
125127
{
126128
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
@@ -141,31 +143,6 @@ - (void)initializeUpdateAfterRestart
141143
}
142144
}
143145

144-
145-
/*
146-
* This method performs the actual initialization work for an update
147-
* to ensure that the necessary state is setup, including:
148-
* --------------------------------------------------------
149-
* 1. Updating the current bundle URL to point at the latest update on disk
150-
* 2. Optionally restarting the app to load the new bundle
151-
* 3. Optionally starting the rollback protection timer
152-
*/
153-
- (void)initializeUpdateWithRollbackTimeout:(int)rollbackTimeout
154-
needsRestart:(BOOL)needsRestart
155-
{
156-
didUpdate = YES;
157-
158-
if (needsRestart) {
159-
[self loadBundle];
160-
}
161-
162-
if (0 != rollbackTimeout) {
163-
dispatch_async(dispatch_get_main_queue(), ^{
164-
[self startRollbackTimer:rollbackTimeout];
165-
});
166-
}
167-
}
168-
169146
/*
170147
* This method checks to see whether a specific package hash
171148
* has previously failed installation.

0 commit comments

Comments
 (0)