summaryrefslogtreecommitdiff
path: root/xP/public/xP.js
diff options
context:
space:
mode:
Diffstat (limited to 'xP/public/xP.js')
-rw-r--r--xP/public/xP.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/xP/public/xP.js b/xP/public/xP.js
index ced93e9..f80182a 100644
--- a/xP/public/xP.js
+++ b/xP/public/xP.js
@@ -580,13 +580,20 @@ let Buffer = {
return m('.buffer')
let lastDateMark = undefined
+ let squashing = false
let markBefore = b.lines.length
- b.newMessages - b.newUnimportantMessages
b.lines.forEach((line, i) => {
if (i == markBefore)
lines.push(m('.unread'))
- if (line.isUnimportant && b.hideUnimportant)
+
+ if (!line.isUnimportant || !b.hideUnimportant) {
+ squashing = false
+ } else if (squashing) {
return
+ } else {
+ squashing = true
+ }
let date = new Date(line.when)
let dateMark = date.toLocaleDateString()
@@ -594,6 +601,11 @@ let Buffer = {
lines.push(m('.date', {}, dateMark))
lastDateMark = dateMark
}
+ if (squashing) {
+ lines.push(m('.time.hidden'))
+ lines.push(m('.content'))
+ return
+ }
let attrs = {}
if (line.leaked)