diff --git a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml index 9eabc6d0e..b09a998ce 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml @@ -193,9 +193,9 @@ FontSize="16" FontWeight="SemiBold" Text="{DynamicResource flowlauncher_plugin_program_suffixes_URL_types}" /> - Steam Games - Epic Games - Http/Https + Steam Games + Epic Games + Http/Https (); public string[] CustomProtocols { get; set; } = Array.Empty(); - [JsonIgnore] public Dictionary BuiltinSuffixesStatus { get; set; } = new Dictionary{ { "exe", true }, { "appref-ms", true }, { "lnk", true } }; - [JsonIgnore] public Dictionary BuiltinProtocolsStatus { get; set; } = new Dictionary{ - { $"steam://run/{SuffixSeparator}steam://rungameid/", true }, { "com.epicgames.launcher://apps/", true }, { $"http://{SuffixSeparator}https://", false} + { "steam", true }, { "epic", true }, { "http", false } + }; + + [JsonIgnore] + public Dictionary BuiltinProtocols { get; set; } = new Dictionary{ + { "steam", $"steam://run/{SuffixSeparator}steam://rungameid/" }, { "epic", "com.epicgames.launcher://apps/" }, { "http", $"http://{SuffixSeparator}https://"} }; public bool UseCustomSuffixes { get; set; } = false; @@ -30,7 +33,7 @@ namespace Flow.Launcher.Plugin.Program public string[] GetSuffixes() { List extensions = new List(); - foreach(var item in BuiltinSuffixesStatus) + foreach (var item in BuiltinSuffixesStatus) { if (item.Value) { @@ -60,10 +63,13 @@ namespace Flow.Launcher.Plugin.Program { if (item.Value) { - var tmp = item.Key.Split(SuffixSeparator, StringSplitOptions.RemoveEmptyEntries); - foreach(var p in tmp) + if (BuiltinProtocols.TryGetValue(item.Key, out string ps)) { - protocols.Add(p); + var tmp = ps.Split(SuffixSeparator, StringSplitOptions.RemoveEmptyEntries); + foreach (var protocol in tmp) + { + protocols.Add(protocol); + } } } }