use sr
Some checks failed
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky 2024-10-25 13:59:29 +02:00
parent b546efe0f4
commit 5b0dd13598
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class OurHandler : public WinToastLib::IWinToastHandler {
};
MessageN10n::MessageN10n(Contact3Registry& cr, RegistryMessageModelI& rmm) : _cr(cr), _rmm(rmm) {
MessageN10n::MessageN10n(Contact3Registry& cr, RegistryMessageModelI& rmm) : _cr(cr), _rmm(rmm), _rmm_sr(_rmm.newSubRef(this)) {
// Register WinToast App User Model
WinToastLib::WinToast::instance()->setAppName(L"Tomato");
const auto aumi = WinToastLib::WinToast::configureAUMI(L"green", L"solanaceae", L"solanaceae_message_n10n", L"20240517");
@ -40,7 +40,7 @@ MessageN10n::MessageN10n(Contact3Registry& cr, RegistryMessageModelI& rmm) : _cr
if (!WinToastLib::WinToast::instance()->initialize()) {
std::wcout << L"Error, could not initialize the lib!" << std::endl;
} else {
_rmm.subscribe(this, RegistryMessageModel_Event::message_construct);
_rmm_sr.subscribe(RegistryMessageModel_Event::message_construct);
}
}

View File

@ -5,6 +5,7 @@
class MessageN10n : public RegistryMessageModelEventI {
Contact3Registry& _cr;
RegistryMessageModelI& _rmm;
RegistryMessageModelI::SubscriptionReference _rmm_sr;
public:
MessageN10n(Contact3Registry& cr, RegistryMessageModelI& rmm);