lorenz.stechauner committed 2024-02-29 13:03:32 +01:00
1 parent cc72a8365e
commit 53a25b3be4
2 files changed
-8

No files matched your search

-7
View File
@@ -39,18 +39,11 @@ namespace Elwig.Windows {
await OnRenewContext();
}
protected override void OnClosed(EventArgs evt) {
base.OnClosed(evt);
Context.Dispose();
}
protected async Task RenewContext() {
if (!_renewPending) return;
var old = Context;
Context = new();
await OnRenewContext();
_renewPending = false;
old.Dispose();
}
abstract protected Task OnRenewContext();