Skip to content

Commit ad307c2

Browse files
committed
Small fixes for the notifications lib, targetting a new SDK.
1 parent 4e81ec7 commit ad307c2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
<Choose>
1919

2020
<!--Desktop Win32 apps-->
21-
<When Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='netcoreapp3.0'">
21+
<When Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='netcoreapp3.1'">
2222
<ItemGroup>
2323
<!--Reference Windows SDK NuGet of correct target platform version-->
24-
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.17763.1000" />
24+
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
2525
</ItemGroup>
2626
<PropertyGroup>
2727
<!--Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available-->
@@ -40,7 +40,7 @@
4040
</Choose>
4141

4242
<!--NET Core desktop apps also need the Registry NuGet package-->
43-
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
43+
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1'">
4444
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
4545
</ItemGroup>
4646

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ private static bool IsAdaptiveToastSupported()
121121
{
122122
switch (AnalyticsInfo.VersionInfo.DeviceFamily)
123123
{
124+
// Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
124125
case "Windows.Mobile":
125126
case "Windows.Desktop":
126-
return true;
127+
return ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3);
127128

128129
// Other device families do not support adaptive toasts
129130
default:

0 commit comments

Comments
 (0)