aboutsummaryrefslogtreecommitdiff
path: root/src/components/status_body
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status_body')
-rw-r--r--src/components/status_body/status_body.js16
-rw-r--r--src/components/status_body/status_body.vue4
2 files changed, 11 insertions, 9 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) {
diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue
index a088e6bc..24d842c2 100644
--- a/src/components/status_body/status_body.vue
+++ b/src/components/status_body/status_body.vue
@@ -17,14 +17,14 @@
<button
v-if="longSubject && showingLongSubject"
class="button-unstyled -link tall-subject-hider"
- @click.prevent="showingLongSubject=false"
+ @click.prevent="toggleShowingLongSubject"
>
{{ $t("status.hide_full_subject") }}
</button>
<button
v-else-if="longSubject"
class="button-unstyled -link tall-subject-hider"
- @click.prevent="showingLongSubject=true"
+ @click.prevent="toggleShowingLongSubject"
>
{{ $t("status.show_full_subject") }}
</button>