ContextWindow: Add HasContextLoaded property
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user