This commit is contained in:
Vic 2022-10-21 18:39:03 +08:00
parent 3362d1cba7
commit d92ea580b2
3 changed files with 5 additions and 4 deletions

View file

@ -19,7 +19,7 @@ namespace Flow.Launcher.Test.Plugins
var app = new UWP.Application(); var app = new UWP.Application();
// Act // Act
var result = app.FormattedPriReferenceValue(packageName, rawPriReferenceValue); var result = UWP.Application.FormattedPriReferenceValue(packageName, rawPriReferenceValue);
// Assert // Assert
Assert.IsTrue(result == expectedFormat, Assert.IsTrue(result == expectedFormat,

View file

@ -185,7 +185,7 @@ namespace Flow.Launcher.Plugin.Program
return menuOptions; return menuOptions;
} }
private void DisableProgram(IProgram programToDelete) private static void DisableProgram(IProgram programToDelete)
{ {
if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
return; return;
@ -219,6 +219,7 @@ namespace Flow.Launcher.Plugin.Program
{ {
await IndexProgramsAsync(); await IndexProgramsAsync();
} }
public void Dispose() public void Dispose()
{ {
Win32.Dispose(); Win32.Dispose();

View file

@ -91,7 +91,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
} }
/// http://www.hanselman.com/blog/GetNamespacesFromAnXMLDocumentWithXPathDocumentAndLINQToXML.aspx /// http://www.hanselman.com/blog/GetNamespacesFromAnXMLDocumentWithXPathDocumentAndLINQToXML.aspx
private string[] XmlNamespaces(string path) private static string[] XmlNamespaces(string path)
{ {
XDocument z = XDocument.Load(path); XDocument z = XDocument.Load(path);
if (z.Root != null) if (z.Root != null)
@ -536,7 +536,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
} }
} }
public string FormattedPriReferenceValue(string packageName, string rawPriReferenceValue) public static string FormattedPriReferenceValue(string packageName, string rawPriReferenceValue)
{ {
const string prefix = "ms-resource:"; const string prefix = "ms-resource:";