mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
fix unread count in browser title
This commit is contained in:
parent
188da1f122
commit
bd43cb60f6
@ -240,8 +240,11 @@ var vm = new Vue({
|
|||||||
deep: true,
|
deep: true,
|
||||||
handler: debounce(function() {
|
handler: debounce(function() {
|
||||||
var title = TITLE
|
var title = TITLE
|
||||||
if (this.totalStats.unread) {
|
var unreadCount = Object.values(this.feedStats).reduce(function(acc, stat) {
|
||||||
title += ' ('+this.totalStats.unread+')'
|
return acc + stat.unread
|
||||||
|
}, 0)
|
||||||
|
if (unreadCount) {
|
||||||
|
title += ' ('+unreadCount+')'
|
||||||
}
|
}
|
||||||
document.title = title
|
document.title = title
|
||||||
}, 500),
|
}, 500),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user