|
|
@ -61,6 +61,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
OWSAssertDebug(block);
|
|
|
|
OWSAssertDebug(block);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CurrentAppContext().isRunningTests) {
|
|
|
|
|
|
|
|
// We don't need to an any "on app ready" work
|
|
|
|
|
|
|
|
// in the tests.
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (self.isAppReady) {
|
|
|
|
if (self.isAppReady) {
|
|
|
|
block();
|
|
|
|
block();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -93,6 +99,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
NSArray<AppReadyBlock> *appReadyBlocks = [self.appReadyBlocks copy];
|
|
|
|
NSArray<AppReadyBlock> *appReadyBlocks = [self.appReadyBlocks copy];
|
|
|
|
[self.appReadyBlocks removeAllObjects];
|
|
|
|
[self.appReadyBlocks removeAllObjects];
|
|
|
|
|
|
|
|
|
|
|
|
for (AppReadyBlock block in appReadyBlocks) {
|
|
|
|
for (AppReadyBlock block in appReadyBlocks) {
|
|
|
|
block();
|
|
|
|
block();
|
|
|
|
}
|
|
|
|
}
|
|
|
|