fix unread count in browser title
This commit is contained in:
parent
188da1f122
commit
bd43cb60f6
1 changed files with 5 additions and 2 deletions
|
|
@ -240,8 +240,11 @@ var vm = new Vue({
|
|||
deep: true,
|
||||
handler: debounce(function() {
|
||||
var title = TITLE
|
||||
if (this.totalStats.unread) {
|
||||
title += ' ('+this.totalStats.unread+')'
|
||||
var unreadCount = Object.values(this.feedStats).reduce(function(acc, stat) {
|
||||
return acc + stat.unread
|
||||
}, 0)
|
||||
if (unreadCount) {
|
||||
title += ' ('+unreadCount+')'
|
||||
}
|
||||
document.title = title
|
||||
}, 500),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue