xP: advance unread marker in an inactive tab
This commit is contained in:
parent
6387145adc
commit
6f4a3f4657
@ -221,18 +221,21 @@ rpc.addEventListener('BufferLine', event => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let visible = e.bufferName == bufferCurrent || e.leakToActive
|
let visible = !document.hidden &&
|
||||||
|
(e.bufferName == bufferCurrent || e.leakToActive)
|
||||||
b.lines.push({...line})
|
b.lines.push({...line})
|
||||||
if (!visible || b.newMessages || b.newUnimportantMessages) {
|
if (!(visible || e.leakToActive) ||
|
||||||
|
b.newMessages || b.newUnimportantMessages) {
|
||||||
if (line.isUnimportant)
|
if (line.isUnimportant)
|
||||||
b.newUnimportantMessages++
|
b.newUnimportantMessages++
|
||||||
else
|
else
|
||||||
b.newMessages++
|
b.newMessages++
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.leakToActive) {
|
if (e.leakToActive) {
|
||||||
let bc = buffers.get(bufferCurrent)
|
let bc = buffers.get(bufferCurrent)
|
||||||
bc.lines.push({...line, leaked: true})
|
bc.lines.push({...line, leaked: true})
|
||||||
if (bc.newMessages || bc.newUnimportantMessages) {
|
if (!visible || bc.newMessages || bc.newUnimportantMessages) {
|
||||||
if (line.isUnimportant)
|
if (line.isUnimportant)
|
||||||
bc.newUnimportantMessages++
|
bc.newUnimportantMessages++
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user