From 8e18709fb76f97460eb3b2d6316c142237ba8cd0 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 16 Feb 2023 11:51:23 +0100 Subject: [PATCH] Fix notifications after switching the application --- src/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3cdcdb9..f383403 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,6 +68,13 @@ INITIALIZE_PLUGIN() { deinitLogging(); } +DEINITIALIZE_PLUGIN() { + if (gNotificationModuleInitDone) { + NotificationModule_DeInitLibrary(); + gNotificationModuleInitDone = false; + } +} + // Called whenever an application was started. ON_APPLICATION_START() { initLogging(); @@ -89,10 +96,3 @@ ON_APPLICATION_REQUESTS_EXIT() { } deinitLogging(); } - -ON_APPLICATION_ENDS() { - if (gNotificationModuleInitDone) { - NotificationModule_DeInitLibrary(); - gNotificationModuleInitDone = false; - } -} \ No newline at end of file