You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/04/21 06:19:09 UTC
[46/50] incubator-weex git commit: * [ios] try to fix list crash on
some occasion
* [ios] try to fix list crash on some occasion
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8b9cf602
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8b9cf602
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8b9cf602
Branch: refs/heads/0.13-dev
Commit: 8b9cf6027d14161e6ce49f2e2ec0cbb471242137
Parents: 6fa910f
Author: acton393 <zh...@gmail.com>
Authored: Thu Apr 20 16:28:00 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Apr 20 16:28:00 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8b9cf602/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
index 45137ef..99f6f54 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
@@ -276,16 +276,17 @@
}
[self.weexInstance.componentManager _addUITask:^{
- WXLogDebug(@"Insert section:%ld", insertIndex);
- [_completedSections insertObject:completedInsertSection atIndex:insertIndex];
- if (completedReloadSection) {
- WXLogDebug(@"Reload section:%ld", insertIndex - 1);
- _completedSections[insertIndex - 1] = completedReloadSection;
- }
+ WXLogDebug(@"Insert section:%ld", (unsigned long)insertIndex);
[UIView performWithoutAnimation:^{
[_tableView beginUpdates];
+ [_completedSections insertObject:completedInsertSection atIndex:insertIndex];
+ if (completedReloadSection) {
+ WXLogDebug(@"Reload section:%u", insertIndex - 1);
+ _completedSections[insertIndex - 1] = completedReloadSection;
+ }
+
[self _insertTableViewSectionAtIndex:insertIndex keepScrollPosition:keepScrollPosition animation:UITableViewRowAnimationNone];
if (completedReloadSection) {