aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/notice-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/notice-controller.js')
-rw-r--r--app/scripts/notice-controller.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/scripts/notice-controller.js b/app/scripts/notice-controller.js
index 6fe8b8cf0..63b422c5b 100644
--- a/app/scripts/notice-controller.js
+++ b/app/scripts/notice-controller.js
@@ -58,6 +58,18 @@ module.exports = class NoticeController extends EventEmitter {
}
}
+ markAllNoticesRead () {
+ const noticeList = this.getNoticesList()
+ noticeList.forEach(notice => {
+ notice.read = true
+ notice.body = ''
+ })
+ this.setNoticesList(noticeList)
+ const latestNotice = this.getNextUnreadNotice()
+ return latestNotice
+ }
+
+
async updateNoticesList () {
const newNotices = await this._retrieveNoticeData()
const oldNotices = this.getNoticesList()