Skip to content

Commit

Permalink
fix(progressring): Fixed bug on Wasm where ProgressRing was stuck.
Browse files Browse the repository at this point in the history
  • Loading branch information
carldebilly committed May 6, 2020
1 parent 00df9d8 commit c9d0ea0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AddIns/Uno.UI.Lottie/LottieVisualSource.wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ partial void InnerUpdate()
WebAssemblyRuntime.InvokeJS(string.Concat(js));
_isPlaying = player.AutoPlay;

ApplyPlayState();
}

private void ApplyPlayState()
{
if (_playState != null)
{
var (fromProgress, toProgress, looped) = _playState.Value;
Expand Down Expand Up @@ -184,6 +189,7 @@ void IAnimatedVisualSource.Resume()
{
return;
}

var js = new[]
{
"Uno.UI.Lottie.resume(",
Expand Down Expand Up @@ -218,6 +224,9 @@ void IAnimatedVisualSource.Load()
{
return;
}

ApplyPlayState();

if (!_isPlaying)
{
return;
Expand Down

0 comments on commit c9d0ea0

Please sign in to comment.