diff options
Diffstat (limited to 'app/scripts/notice-controller.js')
-rw-r--r-- | app/scripts/notice-controller.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/scripts/notice-controller.js b/app/scripts/notice-controller.js new file mode 100644 index 000000000..f1785d705 --- /dev/null +++ b/app/scripts/notice-controller.js @@ -0,0 +1,18 @@ +const EventEmitter = require('events').EventEmitter + +module.exports = class NoticeController extends EventEmitter { + + constructor (opts) { + super() + this.configManager = opts.configManager + } + + getState() { + var lastUnreadNotice = this.configManager.getLatestUnreadNotice() + + return { + lastUnreadNotice: lastUnreadNotice, + noActiveNotices: !lastUnreadNotice, + } + } +} |