Skip to content

Commit

Permalink
Fix activation not writing to pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
DuBistKomisch committed May 3, 2021
1 parent 3194707 commit c5faece
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/toasteventhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification * /*sender*/,
std::wcout << dataMap.at(L"button") << std::endl;
m_userAction = SnoreToastActions::Actions::ButtonClicked;
}
if (!m_toast.pipeName().empty()) {
if (m_userAction == SnoreToastActions::Actions::ButtonClicked) {
Utils::writePipe(m_toast.pipeName(), m_toast.formatAction(m_userAction, { { L"button", dataMap.at(L"button") } }));
} else {
Utils::writePipe(m_toast.pipeName(), m_toast.formatAction(m_userAction));
}
}
}
SetEvent(m_event);
return S_OK;
Expand Down

0 comments on commit c5faece

Please sign in to comment.