diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-09-11 21:30:51 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-09-11 21:50:09 +0200 |
commit | c3a52b9e4cd346cf7b8964a69105fdcd30c4ec05 (patch) | |
tree | 463f582e7b33184737d0303c3ae982afd78a7fb1 /xP/public/xP.js | |
parent | 96fc12bc4c852f1343a120126f1f46ac7cca447d (diff) | |
download | xK-c3a52b9e4cd346cf7b8964a69105fdcd30c4ec05.tar.gz xK-c3a52b9e4cd346cf7b8964a69105fdcd30c4ec05.tar.xz xK-c3a52b9e4cd346cf7b8964a69105fdcd30c4ec05.zip |
xP: indicate hidden buffer lines
Diffstat (limited to 'xP/public/xP.js')
-rw-r--r-- | xP/public/xP.js | 14 |
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) |