Fix not sending notifications to other modules

This commit is contained in:
Edward Shen 2020-11-06 10:28:49 -05:00
parent c39f60409d
commit eae561e67d
Signed by: edward
GPG key ID: F350507060ED6C90

View file

@ -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);