aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/notice-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-02-10 09:47:51 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-02-10 09:47:51 +0800
commit1d0fcf129c8bd7174aecccca3acf54ee83215d19 (patch)
treef6423a24d299478f8e174e319c7c9c76bd804936 /app/scripts/notice-controller.js
parent2f6bf1c074fc49fd0354380c24e07eb9aa2a5ec2 (diff)
downloadtangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar.gz
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar.bz2
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar.lz
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar.xz
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.tar.zst
tangerine-wallet-browser-1d0fcf129c8bd7174aecccca3acf54ee83215d19.zip
Fix bugs with notice. Add disclaimer notice.
Diffstat (limited to 'app/scripts/notice-controller.js')
-rw-r--r--app/scripts/notice-controller.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/notice-controller.js b/app/scripts/notice-controller.js
index ba7c68df4..0d72760fe 100644
--- a/app/scripts/notice-controller.js
+++ b/app/scripts/notice-controller.js
@@ -35,12 +35,12 @@ module.exports = class NoticeController extends EventEmitter {
return Promise.resolve(true)
}
- markNoticeRead (notice, cb) {
+ markNoticeRead (noticeToMark, cb) {
cb = cb || function (err) { if (err) throw err }
try {
var notices = this.getNoticesList()
- var id = notice.id
- notices[id].read = true
+ var index = notices.findIndex((currentNotice) => currentNotice.id === noticeToMark.id)
+ notices[index].read = true
this.setNoticesList(notices)
const latestNotice = this.getLatestUnreadNotice()
cb(null, latestNotice)