Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): delay of animationSet not working under new sync mechanism #3938

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading