diff options
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index e9696041..c1db2d9d 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -241,19 +241,20 @@ void InitGpgFrontendCore() { }, "default_channel_ctx_init")); - Module::ListenRTPublishEvent( - &default_ctx, - Module::GetRealModuleIdentifier( - "com.bktus.gpgfrontend.module.integrated.gnupginfogathering"), - "gnupg.gathering_done", - [=](Module::Namespace, Module::Key, int, std::any) { - SPDLOG_DEBUG( - "gnupginfogathering gnupg.gathering_done changed, restarting gpg " - "components"); - // try to restart all components - GpgFrontend::GpgAdvancedOperator::RestartGpgComponents(); + Module::TriggerEvent( + "GPGFRONTEND_CORE_INITLIZED", + [](const Module::EventIdentifier& /*e*/, + const Module::Event::ListenerIdentifier& l_id, DataObjectPtr o) { + if (l_id == Module::GetRealModuleIdentifier( + "com.bktus.gpgfrontend.module.integrated." + "gnupginfogathering")) { + SPDLOG_DEBUG( + "gnupginfogathering gnupg.gathering_done changed, restarting gpg " + "components"); + // try to restart all components + GpgFrontend::GpgAdvancedOperator::RestartGpgComponents(); + } }); - Module::TriggerEvent("GPGFRONTEND_CORE_INITLIZED"); } void reset_gpgfrontend_core() { SingletonStorageCollection::GetInstance(true); } |