diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 8972c494..f7fa4dce 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -42,7 +42,7 @@ export default Vue.component('RichContent', { // NEVER EVER TOUCH DATA INSIDE RENDER render (h) { // Pre-process HTML - const { newHtml: html, lastMentions } = preProcessPerLine(this.html, this.greentext, this.hideLastMentions) + const { newHtml: html, lastMentions } = preProcessPerLine(this.html, this.greentext, this.hideMentions) const firstMentions = [] // Mentions that appear in the beginning of post body const lastTags = [] // Tags that appear at the end of post body const writtenMentions = [] // All mentions that appear in post body @@ -187,6 +187,13 @@ export default Vue.component('RichContent', { return item } + // DO NOT USE SLOTS they cause a re-render feedback loop here. + // slots updated -> rerender -> emit -> update up the tree -> rerender -> ... + // at least until vue3? + const result = + { convertHtmlToTree(html).map(processItem).reverse().map(processItemReverse).reverse() } + + const event = { firstMentions, lastMentions, @@ -195,12 +202,6 @@ export default Vue.component('RichContent', { writtenTags } - const result = - { this.$slots.prefix } - { convertHtmlToTree(html).map(processItem).reverse().map(processItemReverse).reverse() } - { this.$slots.suffix } - - // DO NOT MOVE TO UPDATE. BAD IDEA. this.$emit('parseReady', event) diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index 68f6701f..799e812d 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -38,10 +38,11 @@ > {{ $t("general.show_more") }} - + + - - +