private async void LibraryUpdated(LibraryUpdate update) { await InvokeAsync(async() => { UpdateNotification = update; StateHasChanged(); if (update.Complete) { await GetBooks(); } }); }
protected void SendLibraryUpdate() { if (!IsConnected) { return; } if (LibraryUpdate != null) { LibraryUpdate.Raise(this, new EventArgs()); } }
protected override async Task OnInitializedAsync() { NotificationService.LibraryUpdated = LibraryUpdated; UpdateNotification = new LibraryUpdate(true); await GetBooks(); }