Skip to content

Commit

Permalink
Disable periodic notifications pending many fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WamWooWam committed Oct 12, 2024
1 parent 91336e9 commit 9d3f10f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Unicord.Universal.Package/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
IgnorableNamespaces="uap mp uap2 uap3 uap4 uap5 rescap">
<Identity Name="24101WamWooWamRD.Unicord" Publisher="CN=0F22111D-EDF0-42F0-B58D-26C4C5C5054B" Version="2.0.42.0" />
<Identity Name="24101WamWooWamRD.Unicord" Publisher="CN=0F22111D-EDF0-42F0-B58D-26C4C5C5054B" Version="2.0.43.0" />
<mp:PhoneIdentity PhoneProductId="5783aabf-3049-421f-ae1d-e88bd89018f2" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>ms-resource:AppDisplayName</DisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<AppxBundle>Always</AppxBundle>
<AppInstallerUri>https://wamwoowam.co.uk/unicord/download</AppInstallerUri>
Expand Down
16 changes: 9 additions & 7 deletions Unicord.Universal/Services/BackgroundNotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ internal async Task StartupAsync()
{
if (await StartFullTrustBackgroundTaskAsync())
{
var periodicTask = BackgroundTaskRegistration.AllTasks.Values.FirstOrDefault(i => i.Name.Equals(PERIODIC_BACKGROUND_TASK_NAME));
if (periodicTask != null)
{
_logger.LogInformation("Disabling periodic background task because full-trust task is running.");
periodicTask.Unregister(true);
}

}
else
{
await RegisterPeriodicBackgroundTaskAsync();
//await RegisterPeriodicBackgroundTaskAsync();
await StartInProcTaskAsync();
}

var periodicTask = BackgroundTaskRegistration.AllTasks.Values.FirstOrDefault(i => i.Name.Equals(PERIODIC_BACKGROUND_TASK_NAME));
if (periodicTask != null)
{
_logger.LogInformation("Disabling periodic background task because full-trust task is running.");
periodicTask.Unregister(true);
}
}

private async Task<bool> RegisterToastActivationBackgroundTaskAsync()
Expand Down

0 comments on commit 9d3f10f

Please sign in to comment.