Skip to content

Commit ff0b927

Browse files
committed
Another slight variation
1 parent 2bad369 commit ff0b927

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,15 @@ public static Win32AppInfo Get()
4141

4242
string aumid;
4343

44-
// If it contains a backslash
45-
if (appId.Contains('\\'))
44+
// If the app ID is too long
45+
if (appId.Length > AUMID_MAX_LENGTH)
46+
{
47+
// Hash the AUMID
48+
aumid = HashAppId(appId);
49+
}
50+
51+
// Else if it contains a backslash
52+
else if (appId.Contains('\\'))
4653
{
4754
// For versions 19042 and older of Windows 10, we can't use backslashes - Issue #3870
4855
// So we change it to not include those
@@ -54,13 +61,6 @@ public static Win32AppInfo Get()
5461
aumid = appId;
5562
}
5663

57-
// If the AUMID is too long
58-
if (aumid.Length > AUMID_MAX_LENGTH)
59-
{
60-
// Hash the AUMID
61-
aumid = HashAppId(aumid);
62-
}
63-
6464
// Then try to get the shortcut (for display name and icon)
6565
IShellItem shortcutItem = null;
6666
try

0 commit comments

Comments
 (0)