From 0b62dbb228eaafbb1c837f278ab0cbfad17b3b8c Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 22 Jun 2023 14:40:56 +0900 Subject: [PATCH] [NUI] Clear old resources cached data After overhead reducetion patch #5280 merged, Some side effect occured. Previously we always ask some properties to dali side visual. But now we return cached value in NUI. Since URL property clear-up all properties, to fit previous logic, let we also clean-up cached properties. (Actually, mark only for this case) Signed-off-by: Eunki, Hong --- .../src/public/BaseComponents/LottieAnimationView.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs b/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs index 5dd2c4f..6d5894d 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs @@ -133,9 +133,16 @@ namespace Tizen.NUI.BaseComponents { set { + // Reset cached infomations. + currentStates.contentInfo = null; + currentStates.mark1 = null; + currentStates.mark2 = null; + currentStates.framePlayRangeMin = -1; + currentStates.framePlayRangeMax = -1; + currentStates.totalFrame = -1; + string ret = (value == null ? "" : value); currentStates.url = ret; - currentStates.totalFrame = -1; // Reset cached totalFrame value; NUILog.Debug($"<[{GetId()}]SET url={currentStates.url}"); @@ -159,8 +166,6 @@ namespace Tizen.NUI.BaseComponents // All states applied well. currentStates.changed = false; - currentStates.contentInfo = null; - if (currentStates.scale != 1.0f) { Scale = new Vector3(currentStates.scale, currentStates.scale, currentStates.scale); -- 2.7.4