[NUI] Fix TotalFrame getter bug when async load
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 10 Nov 2023 10:37:15 +0000 (19:37 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 15 Nov 2023 08:56:46 +0000 (17:56 +0900)
commitfea27e996d5ac33b446ca13504ede09524f2dab9
tree8ff018e910dc12598cde50a93d5dba1b9a57c60e
parentbc92623b1ca53a9ae966a72656a35daf0a2aa968
[NUI] Fix TotalFrame getter bug when async load

There was some bug when we try to get TotalFrame when async load json file.

DALi engine side default total frame number is 0, and NUI is -1.
So, if we try to get TotalFrame from dali which is still loading, it will
cache the internal total frame as 0. After than, we can never get valid value.

To avoid this problem, we have 2 choice

1. Wait until async load finished, and then get total frame at dali side.
2. Just get 0 for now, and try again when total frame cached as 0.

Solution 1 need some time to resolve it. So now just make 2.

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/LottieAnimationTest.cs