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 {
427427 @weakify (self);
428428 return [BFTask taskFromExecutor: [BFExecutor executorWithDispatchQueue: _preloadQueue] withBlock: ^id {
429429 @strongify (self);
430- [PFUser currentUser ];
431- [PFConfig currentConfig ];
430+
431+ NSArray *tasks = @[
432+ [PFUser getCurrentUserInBackground ],
433+ [PFConfig getCurrentConfigInBackground ],
432434#if !TARGET_OS_WATCH && !TARGET_OS_TV
433- [PFInstallation currentInstallation ];
435+ [PFInstallation getCurrentInstallationInBackground ],
434436#endif
435-
437+ ];
438+ [[BFTask taskForCompletionOfAllTasks: tasks] waitUntilFinished ]; // Wait synchronously to make sure we are blocking preload queue.
436439 [self eventuallyQueue ];
437440
438441 return nil ;
You can’t perform that action at this time.
0 commit comments