App: Make HintContextChange() synchronous by using MainDispatcher
All checks were successful
Test / Run tests (push) Successful in 2m37s

This commit is contained in:
2024-09-12 11:40:32 +02:00
parent 5c08f61963
commit f09c43c1bd
18 changed files with 32 additions and 32 deletions

View File

@ -79,7 +79,7 @@ namespace Elwig {
}
private static void OnContextChanged() {
MainDispatcher.BeginInvoke(async () => await HintContextChange());
MainDispatcher.BeginInvoke(HintContextChange);
}
private static void OverrideCulture() {
@ -201,13 +201,13 @@ namespace Elwig {
BranchMobileNr = entry.Item8;
}
public static async Task HintContextChange() {
public static void HintContextChange() {
var ch = CurrentLastWrite;
if (ch > CurrentApp.LastChanged)
CurrentApp.LastChanged = ch;
foreach (Window w in CurrentApp.Windows) {
if (w is not ContextWindow c) continue;
await c.HintContextChange();
MainDispatcher.BeginInvoke(c.HintContextChange);
}
}