logs-content: Fixed character names being omitted on multipart posts where an action post follows a text post.
the build was successful

This commit is contained in:
2019-01-05 11:16:29 +01:00
parent c0e74f4756
commit b952007f3b
2 changed files with 3 additions and 1 deletions
@@ -13,6 +13,7 @@ module.exports = class {
removed: false,
multipart: false,
anchored: false,
prevWasText: false,
}
this.mounted = false;
@@ -48,6 +49,7 @@ module.exports = class {
const timediff = Date.parse(input.post.time) - Date.parse(input.prev.time)
this.state.multipart = (input.post.nick == input.prev.nick && input.prev.multipart !== false) && (Math.abs(timediff) < 60000);
this.state.prevWasText = (input.prev.kind === "text");
this.updatePost(input)
}
@@ -26,7 +26,7 @@
<markdown class="post-content post-scene" source=state.text />
</div>
<div if(input.post.kind === "action") class="post-body color-text">
$ const prefix = (!state.multipart ? state.shortName + state.nameSuffix + " " : "");
$ const prefix = ((!state.multipart || state.prevWasText) ? state.shortName + state.nameSuffix + " " : "");
<markdown class="post-content post-action" source=(prefix + state.text) />
</div>
<div if(input.post.kind === "text") class="post-body color-text">