[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[IOS] revert methodWithComponentName old interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hpop1994 committed May 30, 2019
1 parent 78153e9 commit c5fabb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

+ (SEL)methodWithComponentName:(NSString *)name withMethod:(NSString *)method isSync:(BOOL *)isSync;

+ (SEL)methodWithComponentName:(NSString *)name withMethod:(NSString *)method;

/**
* @abstract Unregister all the components
*/
Expand Down
8 changes: 6 additions & 2 deletions ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ + (NSDictionary *)componentConfigs {
return [[self sharedInstance] getComponentConfigs];
}

+ (SEL)methodWithComponentName:(NSString *)name withMethod:(NSString *)method {
return [[self sharedInstance] _methodWithComponetName:name withMethod:method isSync:NULL];
}

+ (SEL)methodWithComponentName:(NSString *)name withMethod:(NSString *)method isSync:(BOOL *)isSync
{
return [[self sharedInstance] _methodWithComponetName:name withMethod:method isSync:isSync];
Expand Down Expand Up @@ -191,9 +195,9 @@ - (SEL)_methodWithComponetName:(NSString *)name withMethod:(NSString *)method is
if (config.asyncMethods) {
selStr = [config.asyncMethods objectForKey:method];
}
if (!selStr && config.syncMethods) {
if (isSync && !selStr && config.syncMethods) {
selStr = [config.syncMethods objectForKey:method];
if (selStr.length > 0 && isSync) {
if (selStr.length > 0) {
*isSync = YES;
}
}
Expand Down

0 comments on commit c5fabb5

Please sign in to comment.