weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cxf...@apache.org
Subject [1/2] incubator-weex git commit: * [ios] bugfix moduleEvent
Date Thu, 02 Mar 2017 03:11:44 GMT
Repository: incubator-weex
Updated Branches:
  refs/heads/0.11-dev 33a6c1e8d -> 2f7dd8ab6


* [ios] bugfix moduleEvent


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/82fd327e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/82fd327e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/82fd327e

Branch: refs/heads/0.11-dev
Commit: 82fd327eb053a3af25963d23ca6eaf08b2e55a31
Parents: fa1c8b0
Author: acton393 <zhangxing610321@gmail.com>
Authored: Wed Mar 1 14:29:16 2017 +0800
Committer: acton393 <zhangxing610321@gmail.com>
Committed: Wed Mar 1 14:29:16 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/82fd327e/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 35e9c0f..642c911 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -439,7 +439,11 @@ typedef enum : NSUInteger {
         //had not registered yet
         observer = [NSMutableDictionary new];
         [observer setObject:[@{event:[@[callbackInfo] mutableCopy]} mutableCopy] forKey:moduleClassName];
-        [_moduleEventObservers addEntriesFromDictionary:observer];
+        if (_moduleEventObservers[moduleClassName]) { //support multi event
+            [_moduleEventObservers[moduleClassName] addEntriesFromDictionary:observer[moduleClassName]];
+        }else {
+            [_moduleEventObservers addEntriesFromDictionary:observer];
+        }
     } else {
         observer = _moduleEventObservers[moduleClassName];
         [[observer objectForKey:event] addObject:callbackInfo];


Mime
View raw message