Beispiel #1
0
        private async Task ChangePathVisibilityAsync(Path pathItem)
        {
            try
            {
                var result = await PathService.ChangeVisibility(pathItem);

                var changed = Paths.FirstOrDefault(x => x.Id == pathItem.Id);
                if (changed != null)
                {
                    changed.IsVisible = result.IsVisible;
                }

                StateHasChanged();
            }
            catch (Exception e)
            {
                SnackbarHelper.PrintError(e.Message);
            }
        }