Skip to content

Commit

Permalink
fix(ios): delay of animationSet not working under new sync mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Jul 3, 2024
1 parent de85871 commit a46cc65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ios/sdk/module/animation2/HippyNextAnimationModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ - (void)animatorDidAnimate:(HPOPAnimator *)animator inCustomQueue:(dispatch_queu
[strongSelf.groupAnimSyncLock unlock];

NSMutableArray<id> *targetObjects = [NSMutableArray arrayWithCapacity:pendingAnims.count];
CFTimeInterval now = CACurrentMediaTime();
for (HippyNextAnimation *anim in pendingAnims) {
anim.beginTime = now + anim.delayTime;
[targetObjects addObject:anim.targetObject];
}

Expand Down
7 changes: 5 additions & 2 deletions ios/sdk/module/netinfo/HippyNetInfoIntenal.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ @implementation HippyNetInfoIntenal

static NSString *radioAccessNameIn(CTTelephonyNetworkInfo *networkInfo) {
if (@available(iOS 13.0, *)) {
if (networkInfo.dataServiceIdentifier) {
return [networkInfo.serviceCurrentRadioAccessTechnology objectForKey:networkInfo.dataServiceIdentifier];
// CTTelephonyNetwork has some multi-threading problems for now
// https://developer.apple.com/forums/thread/683362
NSString *identifier = networkInfo.dataServiceIdentifier;
if (identifier) {
return [networkInfo.serviceCurrentRadioAccessTechnology objectForKey:identifier];
}
return nil;
} else {
Expand Down

0 comments on commit a46cc65

Please sign in to comment.