refactor to avoid unnecessary emojify computations (#143)
This commit is contained in:
parent
0e54e15f72
commit
8fb00a961c
|
@ -77,10 +77,10 @@
|
|||
shown && 'shown'
|
||||
)
|
||||
},
|
||||
massagedContent: (originalStatus, $autoplayGifs) => {
|
||||
let content = originalStatus.content
|
||||
|
||||
content = emojifyText(content, originalStatus.emojis, $autoplayGifs)
|
||||
content: (originalStatus) => originalStatus.content,
|
||||
emojis: (originalStatus) => originalStatus.emojis,
|
||||
massagedContent: (content, emojis, $autoplayGifs) => {
|
||||
content = emojifyText(content, emojis, $autoplayGifs)
|
||||
|
||||
// GNU Social and Pleroma don't add <p> tags
|
||||
if (!content.startsWith('<p>')) {
|
||||
|
|
|
@ -61,9 +61,10 @@
|
|||
store: () => store,
|
||||
computed: {
|
||||
spoilerText: (originalStatus) => originalStatus.spoiler_text,
|
||||
massagedSpoilerText: (spoilerText, originalStatus, $autoplayGifs) => {
|
||||
emojis: (originalStatus) => originalStatus.emojis,
|
||||
massagedSpoilerText: (spoilerText, emojis, $autoplayGifs) => {
|
||||
spoilerText = escapeHtml(spoilerText)
|
||||
return emojifyText(spoilerText, originalStatus.emojis, $autoplayGifs)
|
||||
return emojifyText(spoilerText, emojis, $autoplayGifs)
|
||||
},
|
||||
delegateKey: (uuid) => `spoiler-${uuid}`
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue