You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/03/13 07:38:39 UTC
incubator-weex git commit: * [iOS] use mutableArray instead of thread
safe array
Repository: incubator-weex
Updated Branches:
refs/heads/master 5bfcb7bc7 -> db76e84c2
* [iOS] use mutableArray instead of thread safe array
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/db76e84c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/db76e84c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/db76e84c
Branch: refs/heads/master
Commit: db76e84c29391fe9b8770f42e15f1b62a8db9019
Parents: 5bfcb7b
Author: acton393 <zh...@gmail.com>
Authored: Tue Mar 13 15:38:22 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Mar 13 15:38:22 2018 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/db76e84c/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index ede9de3..b0c8dae 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -28,7 +28,6 @@
#import "WXRefreshComponent.h"
#import "WXConfigCenterProtocol.h"
#import "WXSDKEngine.h"
-#import "WXThreadSafeMutableArray.h"
@interface WXScrollerComponnetView:UIScrollView
@end
@@ -51,7 +50,7 @@
@interface WXScrollerComponent()
@property (nonatomic, strong) NSMutableArray * stickyArray;
-@property (nonatomic, strong) WXThreadSafeMutableArray * listenerArray;
+@property (nonatomic, strong) NSMutableArray * listenerArray;
@property (nonatomic, weak) WXRefreshComponent *refreshComponent;
@property (nonatomic, weak) WXLoadingComponent *loadingComponent;
@@ -119,7 +118,7 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
if (self) {
_stickyArray = [NSMutableArray array];
- _listenerArray = [WXThreadSafeMutableArray array];
+ _listenerArray = [NSMutableArray array];
_scrollEvent = NO;
_scrollStartEvent = NO;
_scrollEndEvent = NO;
@@ -383,7 +382,7 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
- (void)addScrollToListener:(WXComponent *)target
{
BOOL has = NO;
- WXThreadSafeMutableArray *listenerArray = [self.listenerArray copy];
+ NSMutableArray *listenerArray = [self.listenerArray copy];
for (WXScrollToTarget *targetData in listenerArray) {
if (targetData.target == target) {
has = YES;
@@ -402,7 +401,7 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
{
if (_shouldRemoveScrollerListener) {
WXScrollToTarget *targetData = nil;
- WXThreadSafeMutableArray *listenerArray = [self.listenerArray copy];
+ NSMutableArray *listenerArray = [self.listenerArray copy];
for (WXScrollToTarget *targetDataTemp in listenerArray) {
if (targetDataTemp.target == target) {
targetData = targetDataTemp;