item status change tweaks
This commit is contained in:
parent
aa015b78c0
commit
89ce8df0e3
2 changed files with 7 additions and 2 deletions
|
|
@ -536,6 +536,9 @@ var vm = new Vue({
|
|||
})
|
||||
},
|
||||
toggleItemStarred: function(item) {
|
||||
if (item.status == 'unread') {
|
||||
this.feedStats[item.feed_id].unread -= 1
|
||||
}
|
||||
if (item.status == 'starred') {
|
||||
item.status = 'read'
|
||||
this.feedStats[item.feed_id].starred -= 1
|
||||
|
|
@ -546,10 +549,13 @@ var vm = new Vue({
|
|||
api.items.update(item.id, {status: item.status})
|
||||
},
|
||||
toggleItemRead: function(item) {
|
||||
if (item.status == 'starred') {
|
||||
this.feedStats[item.feed_id].starred -= 1
|
||||
}
|
||||
if (item.status == 'unread') {
|
||||
item.status = 'read'
|
||||
this.feedStats[item.feed_id].unread -= 1
|
||||
} else if (item.status == 'read') {
|
||||
} else if (item.status != 'unread') {
|
||||
item.status = 'unread'
|
||||
this.feedStats[item.feed_id].unread += 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue