From ab282235b5e84910f6661714b0883a57f45041dd Mon Sep 17 00:00:00 2001 From: Green Sky Date: Thu, 25 Jan 2024 11:49:29 +0100 Subject: [PATCH] make mts reactor to message deletions --- solanaceae/message3/message_time_sort.cpp | 4 ++++ solanaceae/message3/message_time_sort.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/solanaceae/message3/message_time_sort.cpp b/solanaceae/message3/message_time_sort.cpp index 5e0a45f..6dc0da5 100644 --- a/solanaceae/message3/message_time_sort.cpp +++ b/solanaceae/message3/message_time_sort.cpp @@ -27,3 +27,7 @@ bool MessageTimeSort::onEvent(const Message::Events::MessageUpdated& e) { return false; } +bool MessageTimeSort::onEvent(const Message::Events::MessageDestory& e) { + _to_sort.emplace(e.e.registry()); + return false; +} diff --git a/solanaceae/message3/message_time_sort.hpp b/solanaceae/message3/message_time_sort.hpp index bed43b5..e5ca90f 100644 --- a/solanaceae/message3/message_time_sort.hpp +++ b/solanaceae/message3/message_time_sort.hpp @@ -19,5 +19,6 @@ class MessageTimeSort : public RegistryMessageModelEventI { protected: // mm bool onEvent(const Message::Events::MessageConstruct& e) override; bool onEvent(const Message::Events::MessageUpdated& e) override; + bool onEvent(const Message::Events::MessageDestory& e) override; };