Change thread indentation to be more consistent
This commit is contained in:
parent
819986c35b
commit
fe5791e98c
@ -377,10 +377,11 @@ const post = {
|
||||
return Promise.all(replies.map(async (reply) => {
|
||||
const deeperReplies = await oneDeeper(reply.key, depth + 1)
|
||||
lodash.set(reply, 'value.meta.thread.depth', depth)
|
||||
lodash.set(reply, 'value.meta.thread.reply', true)
|
||||
return [reply, deeperReplies]
|
||||
}))
|
||||
}
|
||||
oneDeeper(key, 1).then((nested) => {
|
||||
oneDeeper(key, 0).then((nested) => {
|
||||
const nestedReplies = [...nested]
|
||||
const deepReplies = flattenDeep(nestedReplies)
|
||||
resolve(deepReplies)
|
||||
|
@ -44,6 +44,11 @@ module.exports = ({ msg }) => {
|
||||
'value.meta.thread.target',
|
||||
false
|
||||
))
|
||||
const isReply = Boolean(lodash.get(
|
||||
msg,
|
||||
'value.meta.thread.reply',
|
||||
false
|
||||
))
|
||||
|
||||
const { name } = msg.value.meta.author
|
||||
const timeAgo = msg.value.meta.timestamp.received.since
|
||||
@ -74,7 +79,7 @@ module.exports = ({ msg }) => {
|
||||
messageClasses.push('thread-target')
|
||||
}
|
||||
|
||||
if (depth > 0) {
|
||||
if (isReply) {
|
||||
messageClasses.push('reply')
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user