File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -427,12 +427,15 @@ - (BFTask *)preloadDiskObjectsToMemoryAsync {
427
427
@weakify (self);
428
428
return [BFTask taskFromExecutor: [BFExecutor executorWithDispatchQueue: _preloadQueue] withBlock: ^id {
429
429
@strongify (self);
430
- [PFUser currentUser ];
431
- [PFConfig currentConfig ];
430
+
431
+ NSArray *tasks = @[
432
+ [PFUser getCurrentUserInBackground ],
433
+ [PFConfig getCurrentConfigInBackground ],
432
434
#if !TARGET_OS_WATCH && !TARGET_OS_TV
433
- [PFInstallation currentInstallation ];
435
+ [PFInstallation getCurrentInstallationInBackground ],
434
436
#endif
435
-
437
+ ];
438
+ [[BFTask taskForCompletionOfAllTasks: tasks] waitUntilFinished ]; // Wait synchronously to make sure we are blocking preload queue.
436
439
[self eventuallyQueue ];
437
440
438
441
return nil ;
You can’t perform that action at this time.
0 commit comments