mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
item status change tweaks
This commit is contained in:
parent
aa015b78c0
commit
89ce8df0e3
@ -203,7 +203,6 @@
|
||||
<span class="icon" v-else-if="itemSelectedDetails.status!='starred'" >{% inline "star.svg" %}</span>
|
||||
</button>
|
||||
<button class="toolbar-item"
|
||||
:disabled="itemSelectedDetails.status=='starred'"
|
||||
v-b-tooltip.hover.bottom="'Mark Unread'"
|
||||
@click="toggleItemRead(itemSelectedDetails)">
|
||||
<span class="icon" v-if="itemSelectedDetails.status=='unread'">{% inline "circle-full.svg" %}</span>
|
||||
|
@ -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…
x
Reference in New Issue
Block a user