[#65] MailLogWindow: Fix initial loading
All checks were successful
Test / Run tests (push) Successful in 1m49s
All checks were successful
Test / Run tests (push) Successful in 1m49s
This commit is contained in:
@ -2,6 +2,7 @@ using Elwig.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
@ -18,8 +19,16 @@ namespace Elwig.Windows {
|
||||
FilterInput.TextChanged -= FilterInput_TextChanged;
|
||||
}
|
||||
|
||||
private async void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||
await Load();
|
||||
}
|
||||
|
||||
private async void TimeSpanInput_SelectionChanged(object sender, RoutedEventArgs evt) {
|
||||
if (!IsLoaded) return;
|
||||
await Load();
|
||||
}
|
||||
|
||||
private async Task Load() {
|
||||
DateTime? fromDate = DateTime.Now;
|
||||
if (TimeSpanInput.SelectedIndex == 0) {
|
||||
fromDate = fromDate.Value.AddDays(-7);
|
||||
|
Reference in New Issue
Block a user