diff --git a/Elwig/App.xaml.cs b/Elwig/App.xaml.cs index 8dc6160..160c5ef 100644 --- a/Elwig/App.xaml.cs +++ b/Elwig/App.xaml.cs @@ -53,7 +53,7 @@ namespace Elwig { public static Dispatcher MainDispatcher { get; private set; } private DateTime LastChanged; private static DateTime CurrentLastWrite => File.GetLastWriteTime(Config.DatabaseFile); - private readonly DispatcherTimer ContextTimer = new() { Interval = TimeSpan.FromSeconds(2) }; + private readonly DispatcherTimer ContextTimer = new() { Interval = TimeSpan.FromSeconds(5) }; public App() : base() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); @@ -70,8 +70,9 @@ namespace Elwig { } ContextTimer.Tick += (object? sender, EventArgs evt) => { - if (CurrentLastWrite > LastChanged) { - LastChanged = CurrentLastWrite; + var ch = CurrentLastWrite; + if (ch > LastChanged) { + LastChanged = ch; OnContextChanged(); } };