[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 07:09:04 +0000 (16:09 +0900)
commit3f53e2a98fd3f376fd3d5db7c3879472b170e581
treee2b876500d5b2059a8c8ae7ac1ea382737fc158e
parent95a2342f4fb9f30a90fb688c5292547891fed681
[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