[Perf] reduce some rendezvous
This commit is contained in:
1 parent
96f24a12a7
commit
c14fa7a1d3
1 file changed
+17
-6
@@ -154,15 +154,26 @@ function VideoRowListRowContentTask(input as object) as object
|
||||
end function
|
||||
|
||||
function RemovePlaceHolderItems(contentNode as object)
|
||||
childCount = contentNode.getChildCount()
|
||||
removeIndex = childCount
|
||||
removeCount = 0
|
||||
|
||||
index = childCount - 1
|
||||
isLoading = true
|
||||
while isLoading and contentNode.getChildCount() > 0
|
||||
lastIndex = contentNode.getChildCount() - 1
|
||||
child = contentNode.getChild(lastIndex)
|
||||
isLoading = IsString(child.type) and child.type = "loading"
|
||||
if isLoading = true
|
||||
contentNode.removeChildIndex(lastIndex)
|
||||
while isLoading and index >= 0
|
||||
child = contentNode.getChild(index)
|
||||
isLoading = ValidString(child.type) = "loading"
|
||||
if not isLoading
|
||||
exit while
|
||||
end if
|
||||
removeCount += 1
|
||||
removeIndex -= 1
|
||||
index -= 1
|
||||
end while
|
||||
|
||||
if removeCount > 0
|
||||
contentNode.removeChildrenIndex(removeCount, removeIndex)
|
||||
end if
|
||||
end function
|
||||
|
||||
function HandleFeedLoadErrorDialog(error as object, rowList as object) as void
|
||||
|
||||
Reference in new issue
Block a user