notice-controller - make markAllNoticesRead sync

feature/default_network_editable
kumavis 6 years ago
parent e04f0c877b
commit 846038a69c
  1. 2
      app/scripts/notice-controller.js
  2. 2
      test/unit/app/controllers/notice-controller-test.js

@ -58,7 +58,7 @@ module.exports = class NoticeController extends EventEmitter {
}
}
async markAllNoticesRead () {
markAllNoticesRead () {
const noticeList = this.getNoticesList()
noticeList.forEach(notice => {
notice.read = true

@ -57,7 +57,7 @@ describe('notice-controller', function () {
noticeController.setNoticesList(testList)
await noticeController.markAllNoticesRead()
noticeController.markAllNoticesRead()
const unreadNotices = noticeController.getUnreadNotices()
assert.equal(unreadNotices.length, 0)

Loading…
Cancel
Save