Browse Source

Update BrowserSingleViewLifetime.cs (#14492)

pull/14505/head
Max Katz 2 years ago
committed by GitHub
parent
commit
5fa3ffaeab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      src/Browser/Avalonia.Browser/BrowserSingleViewLifetime.cs

12
src/Browser/Avalonia.Browser/BrowserSingleViewLifetime.cs

@ -18,18 +18,6 @@ internal class BrowserSingleViewLifetime : ISingleViewApplicationLifetime, IActi
initiallyVisible = null;
(visible ? Activated : Deactivated)?.Invoke(this, new ActivatedEventArgs(ActivationKind.Background));
});
// Trigger Activated as an initial state, if web page is visible, and wasn't hidden during initialization.
if (initiallyVisible == true)
{
Dispatcher.UIThread.Invoke(() =>
{
if (initiallyVisible == true)
{
Activated?.Invoke(this, new ActivatedEventArgs(ActivationKind.Background));
}
});
}
}
public AvaloniaView? View;

Loading…
Cancel
Save