2020-02-04 17:41:00 +01:00
|
|
|
|
#include "pch.h"
|
|
|
|
|
#include "BackgroundHandler.h"
|
|
|
|
|
#include "BackgroundHandler.g.cpp"
|
|
|
|
|
|
|
|
|
|
#include "handler_functions.h"
|
|
|
|
|
|
2020-12-15 13:16:09 +01:00
|
|
|
|
namespace winrt::BackgroundActivator::implementation
|
2020-02-04 17:41:00 +01:00
|
|
|
|
{
|
|
|
|
|
using Windows::ApplicationModel::Background::IBackgroundTaskInstance;
|
|
|
|
|
using Windows::UI::Notifications::ToastNotificationActionTriggerDetail;
|
|
|
|
|
|
|
|
|
|
void BackgroundHandler::Run(IBackgroundTaskInstance bti)
|
|
|
|
|
{
|
|
|
|
|
const auto details = bti.TriggerDetails().try_as<ToastNotificationActionTriggerDetail>();
|
|
|
|
|
if (!details)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-27 16:58:47 +02:00
|
|
|
|
dispatch_to_background_handler(details.Argument());
|
2020-02-04 17:41:00 +01:00
|
|
|
|
}
|
|
|
|
|
}
|