Integrazione 0.1.1: Febe per Windows si collega, VS Code, prove su Windows, storico e vista remota #4

Merged
Alby96 merged 49 commits from integrazione/0.1.1 into main 2026-10-20 19:05:36 +02:00
Showing only changes of commit 2ef098226b - Show all commits
+9 -2
View File
@@ -1,6 +1,7 @@
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using Microsoft.Web.WebView2.Core;
using Microsoft.Web.WebView2.Wpf;
@@ -120,7 +121,7 @@ internal sealed class MainWindow : Window
e.Cancel = true;
if (uri.Scheme is "http" or "https")
{
_ = _openOutside(uri);
OpenOutsideLater(uri);
}
}
@@ -138,7 +139,13 @@ internal sealed class MainWindow : Window
}
else if (uri.Scheme is "http" or "https")
{
_ = _openOutside(uri);
OpenOutsideLater(uri);
}
}
/// <summary>
/// Opens <paramref name="uri"/> in Alberto's browser once the handler of WebView2's event has returned: the shell
/// may run a message loop of its own, and WebView2 does not support re-entering its handlers (threading model).
/// </summary>
private void OpenOutsideLater(Uri uri) => Dispatcher.InvokeAsync(() => _openOutside(uri), DispatcherPriority.Background);
}