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

@@ -39,10 +39,6 @@ namespace Elwig.Windows {
ViewModel.FilterSeason = Utils.CurrentYear;
}
protected override async Task OnInit(AppDbContext ctx) {
LockInputs();
}
private void FocusSearchInput(object sender, RoutedEventArgs evt) {
if (!IsEditing && !IsCreating) {
SearchInput.Focus();
@@ -451,17 +447,19 @@ namespace Elwig.Windows {
}
private async void ActiveAreaCommitmentInput_Changed(object sender, RoutedEventArgs evt) {
if (!HasContextLoaded) return;
await RefreshList();
}
private async void SearchInput_TextChanged(object sender, RoutedEventArgs evt) {
if (!HasContextLoaded) return;
var binding = ((TextBox)sender).GetBindingExpression(TextBox.TextProperty);
binding?.UpdateSource();
await RefreshList(true);
}
private async void SeasonInput_TextChanged(object sender, TextChangedEventArgs evt) {
if (ViewModel.FilterSeason == null) return;
if (!HasContextLoaded || ViewModel.FilterSeason == null) return;
await RefreshList();
}