File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1591,7 +1591,10 @@ - (void)generateShortUrl:(NSArray *)tags
15911591
15921592 if ([self .linkCache objectForKey: linkData]) {
15931593 if (callback) {
1594- callback ([self .linkCache objectForKey: linkData], nil );
1594+ // callback on main, this is generally what the client expects and maintains our previous behavior
1595+ dispatch_async (dispatch_get_main_queue (), ^ {
1596+ callback ([self .linkCache objectForKey: linkData], nil );
1597+ });
15951598 }
15961599 return ;
15971600 }
@@ -1774,7 +1777,12 @@ - (void)registerViewWithParams:(NSDictionary *)params andCallback:(callbackWithP
17741777 BranchUniversalObject *buo = [[BranchUniversalObject alloc ] init ];
17751778 buo.contentMetadata .customMetadata = (id ) params;
17761779 [[BranchEvent standardEvent: BranchStandardEventViewItem withContentItem: buo] logEvent ];
1777- if (callback) callback (@{}, nil );
1780+ if (callback) {
1781+ // callback on main, this is generally what the client expects and maintains our previous behavior
1782+ dispatch_async (dispatch_get_main_queue (), ^ {
1783+ callback (@{}, nil );
1784+ });
1785+ }
17781786 });
17791787}
17801788
You can’t perform that action at this time.
0 commit comments