Repository: incubator-weex Updated Branches: refs/heads/master c6754e68f -> 1f1dc67d6
* [iOS] optimize text and waterfall component Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8c939acb Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8c939acb Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8c939acb Branch: refs/heads/master Commit: 8c939acbda324b076e29174e2306cf6556101028 Parents: b947109 Author: acton393 <[email protected]> Authored: Fri Feb 2 15:46:59 2018 +0800 Committer: acton393 <[email protected]> Committed: Fri Feb 2 15:46:59 2018 +0800 ---------------------------------------------------------------------- .../Sources/Component/Recycler/WXRecyclerUpdateController.m | 4 +++- ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8c939acb/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerUpdateController.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerUpdateController.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerUpdateController.m index 03e7848..4630d58 100644 --- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerUpdateController.m +++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerUpdateController.m @@ -162,7 +162,9 @@ if (!self.delegate || !collectionView.dataSource) { return; } - + if (![diffResult hasChanges]) { + return; + } WXLogDebug(@"Diff result:%@", diffResult); [collectionView performBatchUpdates:updates completion:completion]; } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8c939acb/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m index 65f7ae3..3dcc827 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -382,6 +382,9 @@ do {\ - (NSAttributedString *)ctAttributedString { + if (!self.text) { + return nil; + } NSAttributedString * attributedString = nil; pthread_mutex_lock(&(_ctAttributedStringMutex)); if (!_ctAttributedString) {
