fix: preserve packaged deeplink registration
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
0ca2014244
commit
cd67ae8485
@ -45,19 +45,11 @@ public static class DeepLinkHandler
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsPackagedApp()
|
||||
{
|
||||
try
|
||||
{
|
||||
var packageType = Type.GetType("Windows.ApplicationModel.Package, Windows, ContentType=WindowsRuntime");
|
||||
var current = packageType?.GetProperty("Current")?.GetValue(null);
|
||||
return current != null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#if OPENCLAW_TRAY_TESTS
|
||||
private static bool IsPackagedApp() => false;
|
||||
#else
|
||||
private static bool IsPackagedApp() => OpenClawTray.Helpers.PackageHelper.IsPackaged;
|
||||
#endif
|
||||
|
||||
public static void Handle(string uri, DeepLinkActions actions)
|
||||
{
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<DefineConstants>$(DefineConstants);OPENCLAW_TRAY_TESTS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\OpenClaw.Shared\OpenClaw.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user