use sr
This commit is contained in:
parent
b546efe0f4
commit
5b0dd13598
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
class MessageN10n : public RegistryMessageModelEventI {
|
||||
Contact3Registry& _cr;
|
||||
RegistryMessageModelI& _rmm;
|
||||
RegistryMessageModelI::SubscriptionReference _rmm_sr;
|
||||
|
||||
public:
|
||||
MessageN10n(Contact3Registry& cr, RegistryMessageModelI& rmm);
|
||||
|
Loading…
Reference in New Issue
Block a user