Changing order of lottie url composition to enable url change using U… (#249)
This commit is contained in:
committed by
GitHub
parent
e178826265
commit
7dc600bb80
@@ -49,9 +49,6 @@ class LottieRenderer : Renderer<LottieProperty> {
|
||||
super.Render(property, uiTronData, uiTronViewModel, modifier)
|
||||
var uiTronLottieData = uiTronData as? LottieData
|
||||
|
||||
val spec = LottieCompositionSpec.Url(url = uiTronLottieData?.lottieUrl.orEmpty())
|
||||
val composition by rememberLottieComposition(spec)
|
||||
|
||||
if (property.isStateFul.orFalse()) {
|
||||
val state = uiTronViewModel.handle.getStateFlow<String?>(
|
||||
property.getPropertyId(),
|
||||
@@ -77,6 +74,10 @@ class LottieRenderer : Renderer<LottieProperty> {
|
||||
Pair(KEY_MVEL_ACTION, extrasState.value?.get(MvelAction.KEY_MVEL) as? MvelAction)
|
||||
))
|
||||
}
|
||||
|
||||
val spec = LottieCompositionSpec.Url(url = uiTronLottieData?.lottieUrl.orEmpty())
|
||||
val composition by rememberLottieComposition(spec)
|
||||
|
||||
if(property.shouldPlayOnRender.orTrue()) {
|
||||
ObserveProgress(composition, uiTronLottieData, uiTronViewModel)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user