mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-22 02:04:29 -08:00
Fix not sending notifications to other modules
This commit is contained in:
parent
c39f60409d
commit
eae561e67d
1 changed files with 8 additions and 0 deletions
|
@ -227,6 +227,10 @@ Module.register('MMM-pages', {
|
||||||
|
|
||||||
this.delayTimer = setTimeout(() => {
|
this.delayTimer = setTimeout(() => {
|
||||||
self.timer = setInterval(() => {
|
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.notificationReceived('PAGE_INCREMENT');
|
||||||
}, self.config.rotationTime);
|
}, self.config.rotationTime);
|
||||||
}, delay);
|
}, delay);
|
||||||
|
@ -239,6 +243,10 @@ Module.register('MMM-pages', {
|
||||||
|
|
||||||
this.delayTimer = setTimeout(() => {
|
this.delayTimer = setTimeout(() => {
|
||||||
self.timer = setInterval(() => {
|
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.notificationReceived('PAGE_CHANGED', self.config.homePage);
|
||||||
}, self.config.rotationHomePage);
|
}, self.config.rotationHomePage);
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|
Loading…
Reference in a new issue