From 5be5d2d369abd4ffb34dff3d4824183f90a36c78 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 8 Jul 2025 23:13:20 +0100 Subject: [PATCH] [About] Replace process launch with URI launcher for website command --- RomRepoMgr/ViewModels/AboutViewModel.cs | 29 +------------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/RomRepoMgr/ViewModels/AboutViewModel.cs b/RomRepoMgr/ViewModels/AboutViewModel.cs index 4ee5740..3f45812 100644 --- a/RomRepoMgr/ViewModels/AboutViewModel.cs +++ b/RomRepoMgr/ViewModels/AboutViewModel.cs @@ -98,34 +98,7 @@ public sealed class AboutViewModel : ViewModelBase void ExecuteWebsiteCommand() { - var process = new Process - { - StartInfo = - { - UseShellExecute = false, - CreateNoWindow = true, - Arguments = "https://www.claunia.com" - } - }; - - if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - process.StartInfo.FileName = "cmd"; - process.StartInfo.Arguments = $"/c start {process.StartInfo.Arguments.Replace("&", "^&")}"; - } - else if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || - RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD)) - process.StartInfo.FileName = "xdg-open"; - else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - process.StartInfo.FileName = "open"; - else - { - if(Debugger.IsAttached) throw new ArgumentOutOfRangeException(); - - return; - } - - process.Start(); + _ = _view.Launcher.LaunchUriAsync(new Uri("https://www.claunia.com")); } void ExecuteLicenseCommand()