Open Laftek opened 1 year ago
@Laftek Could you confirm whether the NextVersionIsWaiting
event really won't be happened or not?
For example, insert Console.WriteLine(...)
in the event handler method like below, run it, and watch the developer console of the web browser.
private void PWAUpdaterService_NextVersionIsWaiting(object sender, EventArgs e)
{
Console.WriteLine("NextVersionIsWaiting was fired."); // 👈 Add this line.
this.isUpdateReady = true;
}
And if the NextVersionIsWaiting
event was fired, but the UI was not updated, please add invoking the StateHasChanged()
method. The firing NextVersionIsWaiting
event will never be aware from Blazor runtime, so UI updating never occurs automatically.
private void PWAUpdaterService_NextVersionIsWaiting(object sender, EventArgs e)
{
this.isUpdateReady = true;
this.StateHasChanged(); // 👈 Add this line.
}
Hey Jsakamoto,
Great job with this package!!!
Unfortunately I couldnt get it run with my own UI. Below you can see code snippet for subscribing to NextVersionIsWaiting. I am pretty sure its me doing something wrong :/
here is github to repo (Component.razor has all the logic and its used in Index.razor) https://github.com/Laftek/BlazorAppWasmPWALottieRive
Thank you.