Skip to content

Commit 09e47e1

Browse files
committed
Check whether OS is MacOS when setting application type
1 parent 861136a commit 09e47e1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

OsNotifications/Notifications.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public static Uri? WindowsAudioSource {
2424
private static partial void setGuiApplication(sbyte isGuiValue);
2525

2626
public static void SetGuiApplication(bool isGuiValue) {
27+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
28+
return;
29+
2730
setGuiApplication(isGuiValue ? (sbyte) 1 : (sbyte) 0);
2831
_isApplicationTypeSpecified = true;
2932
}

OsNotifications/OsNotifications.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7-
<Version>1.1.1</Version>
7+
<Version>1.1.2</Version>
88
<Authors>DemonExposer</Authors>
99
<Description>Native OS notifications in .NET</Description>
1010
<RepositoryUrl>https://github.com/DemonExposer/OsNotifications</RepositoryUrl>

0 commit comments

Comments
 (0)