Skip to content

Commit

Permalink
Merge pull request #203 from vineetchoudhary/develop
Browse files Browse the repository at this point in the history
Call AppDelegate only on main queue
  • Loading branch information
vineetchoudhary authored Sep 28, 2020
2 parents b2d8c93 + ad19d03 commit a43927a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions AppBox/Common/UploadManager/UploadManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,13 @@ -(void)handleSharedURLResult:(NSString *)url{
-(void)createUniqueShortSharableUrl{
//Create Short URL
[[TinyURL shared] shortenURLForProject:self.project.abpProject completion:^(NSURL *shortURL, NSError *error) {
if (error) {
self.project.appLongShareableURL = shortURL;
[[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Error in creating short URL - %@", error.localizedDescription]];
}
[self createAndUploadJsonWithURL:shortURL];
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
self.project.appLongShareableURL = shortURL;
[[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Error in creating short URL - %@", error.localizedDescription]];
}
[self createAndUploadJsonWithURL:shortURL];
});
}];
}

Expand Down

0 comments on commit a43927a

Please sign in to comment.