Files
PowerToys/src/common/notifications_winrt/BackgroundHandler.cpp

23 lines
623 B
C++

#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;
}
dispatch_to_backround_handler(details.Argument());
}
}