Skip to content

Commit

Permalink
Nullable -> fix snackbars
Browse files Browse the repository at this point in the history
  • Loading branch information
b-straub committed Nov 4, 2024
1 parent ba0462f commit ede3e70
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions DexieNETCloudSample/Components/DBContainer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,22 @@

private async Task UpdateApp()
{
Snackbar.Remove(_updateSnackBar);
if (_updateSnackBar is not null)
{
Snackbar.Remove(_updateSnackBar);
_updateSnackBar = null;
}
ArgumentNullException.ThrowIfNull(Service.DB);
await Service.DB.UpdateServiceWorker();
}

private async Task SubscribePush()
{
Snackbar.Remove(_subscribeSnackBar);
if (_subscribeSnackBar is not null)
{
Snackbar.Remove(_subscribeSnackBar);
_subscribeSnackBar = null;
}
ArgumentNullException.ThrowIfNull(Service.DB);
await Service.SubscribePush();
}
Expand Down

0 comments on commit ede3e70

Please sign in to comment.