From eae561e67d1f6728f533a2e168f609c96dd65c66 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Fri, 6 Nov 2020 10:28:49 -0500 Subject: [PATCH] Fix not sending notifications to other modules --- MMM-pages.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MMM-pages.js b/MMM-pages.js index afdc3fe..da00886 100644 --- a/MMM-pages.js +++ b/MMM-pages.js @@ -227,6 +227,10 @@ Module.register('MMM-pages', { this.delayTimer = setTimeout(() => { self.timer = setInterval(() => { + // Inform other modules and page change. + // MagicMirror automatically excludes the sender from receiving the + // message, so we need to trigger it for ourselves. + self.sendNotification('PAGE_INCREMENT'); self.notificationReceived('PAGE_INCREMENT'); }, self.config.rotationTime); }, delay); @@ -239,6 +243,10 @@ Module.register('MMM-pages', { this.delayTimer = setTimeout(() => { self.timer = setInterval(() => { + // Inform other modules and page change. + // MagicMirror automatically excludes the sender from receiving the + // message, so we need to trigger it for ourselves. + self.sendNotification('PAGE_CHANGED', 0); self.notificationReceived('PAGE_CHANGED', self.config.homePage); }, self.config.rotationHomePage); }, delay);