Skip to content

Commit e4caba0

Browse files
committed
fix: Notification check
1 parent 2bcb131 commit e4caba0

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

Nickvision.Application.WinUI/App.xaml.cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,19 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
3838

3939
private async void App_NotificationInvoked(AppNotificationManager sender, AppNotificationActivatedEventArgs args)
4040
{
41-
if (args.Arguments.ContainsKey("action") && args.Arguments["action"] == "OpenInExplorer")
41+
if (args.Arguments.ContainsKey("action") && args.Arguments["action"] == "OpenInExplorer" && args.Arguments.ContainsKey("param") && Directory.Exists(args.Arguments["param"]))
4242
{
43-
if (!Directory.Exists(args.Arguments["param"]))
43+
try
4444
{
45-
try
45+
using var _ = Process.Start(new ProcessStartInfo()
4646
{
47-
using var _ = Process.Start(new ProcessStartInfo()
48-
{
49-
FileName = args.Arguments["param"],
50-
UseShellExecute = true
51-
});
52-
}
53-
catch
54-
{
55-
await Launcher.LaunchFolderPathAsync(args.Arguments["param"]);
56-
}
47+
FileName = args.Arguments["param"],
48+
UseShellExecute = true
49+
});
50+
}
51+
catch
52+
{
53+
await Launcher.LaunchFolderPathAsync(args.Arguments["param"]);
5754
}
5855
}
5956
}

resources/po/application.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2026-03-23 23:15-0400\n"
11+
"POT-Creation-Date: 2026-03-23 23:25-0400\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"

0 commit comments

Comments
 (0)