aboutsummaryrefslogtreecommitdiff
path: root/src/components/status_body
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2021-09-09 00:03:10 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-03-07 19:19:31 -0500
commit0db5a5a581aa6560637dd85886dfd9d7934f40fa (patch)
tree86497ff3b791454286a5e5167fcab4b2cec64dac /src/components/status_body
parentba858a894c4a1ff1a25c1d72759afccb5ed34f0f (diff)
Fix controlled status display toggles
Diffstat (limited to 'src/components/status_body')
-rw-r--r--src/components/status_body/status_body.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js
index 91c33135..b8f6f9a0 100644
--- a/src/components/status_body/status_body.js
+++ b/src/components/status_body/status_body.js
@@ -26,14 +26,16 @@ const StatusContent = {
'focused',
'noHeading',
'fullContent',
- 'singleLine'
+ 'singleLine',
+ 'showingTall',
+ 'expandingSubject',
+ 'showingLongSubject',
+ 'toggleShowingTall',
+ 'toggleExpandingSubject',
+ 'toggleShowingLongSubject'
],
data () {
return {
- showingTall: this.fullContent || (this.inConversation && this.focused),
- showingLongSubject: false,
- // not as computed because it sets the initial state which will be changed later
- expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject,
postLength: this.status.text.length,
parseReadyDone: false
}
@@ -115,9 +117,9 @@ const StatusContent = {
},
toggleShowMore () {
if (this.mightHideBecauseTall) {
- this.showingTall = !this.showingTall
+ this.toggleShowingTall()
} else if (this.mightHideBecauseSubject) {
- this.expandingSubject = !this.expandingSubject
+ this.toggleExpandingSubject()
}
},
generateTagLink (tag) {