using FNZCM.BlazorWasm.Models; namespace FNZCM.BlazorWasm.UI.Views.Browse { public partial class BrowseView { private DiscDialog ModalDisc { get; set; } private FeLibrary CurrentLibrary { get; set; } private FeDisc CurrentDisc { get; set; } protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); if (FnzDataSet.AllLibrary?.Any() == true) { if (CurrentLibrary == null) { var f = FnzDataSet.AllLibrary.First(); CurrentLibrary = f; } StateHasChanged(); } } public void SelectedLibraryChanged(FeLibrary lib) { CurrentLibrary = lib; StateHasChanged(); } private void SelectDisc(FeDisc disc) { CurrentDisc = disc; StateHasChanged(); ModalDisc.Show(); } } }