notifications: add support for unpackaged apps and protocol activation

This commit is contained in:
yuyoyuppe
2020-02-25 23:04:19 +03:00
committed by Andrey Nekrasov
parent b90f1fc237
commit c543b7585a
12 changed files with 321 additions and 35 deletions

View File

@@ -8,7 +8,6 @@ namespace winrt::PowerToysNotifications::implementation
{
using Windows::ApplicationModel::Background::IBackgroundTaskInstance;
using Windows::UI::Notifications::ToastNotificationActionTriggerDetail;
using Windows::Foundation::WwwFormUrlDecoder;
void BackgroundHandler::Run(IBackgroundTaskInstance bti)
{
@@ -18,10 +17,6 @@ namespace winrt::PowerToysNotifications::implementation
return;
}
WwwFormUrlDecoder decoder{details.Argument()};
const size_t button_id = std::stoi(decoder.GetFirstValueByName(L"button_id").c_str());
auto handler = decoder.GetFirstValueByName(L"handler");
dispatch_to_backround_handler(std::move(handler), std::move(bti), button_id);
dispatch_to_backround_handler(details.Argument());
}
}