ContextWindow: Add HasContextLoaded property

This commit is contained in:
2026-04-05 22:44:52 +02:00
parent d051a2bfcf
commit e5e5e10cd7
9 changed files with 24 additions and 28 deletions

View File

@@ -33,10 +33,6 @@ namespace Elwig.Windows {
ViewModel.FilterOnlyUpcoming = true;
}
protected override async Task OnInit(AppDbContext ctx) {
LockInputs();
}
private async Task RefreshList(bool updateSort = false) {
var vm = ViewModel;
var cursor = Mouse.OverrideCursor != null;
@@ -124,15 +120,17 @@ namespace Elwig.Windows {
}
private async void OnlyUpcomingInput_Changed(object sender, RoutedEventArgs evt) {
if (!HasContextLoaded) return;
await RefreshList();
}
private async void SearchInput_TextChanged(object sender, TextChangedEventArgs evt) {
if (!HasContextLoaded) return;
await RefreshList(true);
}
private async void SeasonInput_TextChanged(object sender, TextChangedEventArgs evt) {
if (ViewModel.FilterSeason == null) return;
if (!HasContextLoaded || ViewModel.FilterSeason == null) return;
ViewModel.FilterOnlyUpcoming = false;
await RefreshList();
}