2020-02-04 19:41:00 +03:00
|
|
|
|
#include "pch.h"
|
|
|
|
|
|
#include "BackgroundHandler.h"
|
|
|
|
|
|
#include "BackgroundHandler.g.cpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include "handler_functions.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace winrt::PowerToysNotifications::implementation
|
|
|
|
|
|
{
|
|
|
|
|
|
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-02-25 23:04:19 +03:00
|
|
|
|
dispatch_to_backround_handler(details.Argument());
|
2020-02-04 19:41:00 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|