Closed awenger closed 6 months ago
val task = if ((data.startsWith("http://") || data.startsWith("https://"))) {
LottieCompositionFactory.fromUrl(lottieView.context, data)
} else {
LottieCompositionFactory.fromAsset(lottieView.context, data)
}
val loadResultListener = LottieListener
Repo case
Problem: Listeners attached to a LottieTask trigger twice if the url is already cached from a previous request.
Case 1
Steps To Reproduce Steps to reproduce the behavior:
Case 2
This behaviour becomes a problem if the callback is wrapped within a
suspendCancellableCoroutine
(here)