From 06cf8628e54a30c5dd9dff153408f9641b8dad00 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 3 Feb 2019 23:47:26 -0500 Subject: [PATCH 1/3] shorten incredibly long content warning or subject --- src/components/status/status.js | 5 +++++ src/components/status/status.vue | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index c718fe9f..4dd0345c 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -36,6 +36,7 @@ const Status = { preview: null, showPreview: false, showingTall: this.inConversation && this.focused, + showingTallSubject: false, expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined' ? !this.$store.state.instance.collapseMessageWithSubject : !this.$store.state.config.collapseMessageWithSubject, @@ -129,6 +130,10 @@ const Status = { const lengthScore = this.status.statusnet_html.split(/ 20 }, + tallSubject () { + const lengthScore = this.status.summary.length / 80 + return lengthScore > 10 + }, isReply () { return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id) }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 3e3e82bf..adbaff73 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -85,7 +85,12 @@ -
+ +
Show more
From 887f1def2e1b8c052ddf2425f192502211c3013e Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 4 Feb 2019 03:16:55 -0500 Subject: [PATCH 2/3] handle poster attachment with tall subjects --- src/components/status/status.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index adbaff73..fdeda42a 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -98,7 +98,7 @@ Show less
-
+
Date: Mon, 4 Feb 2019 09:28:14 -0500 Subject: [PATCH 3/3] #154 - update long subject determine logic, meaningful variable names --- src/components/status/status.js | 7 +++---- src/components/status/status.vue | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 4dd0345c..8b4c50f7 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -36,7 +36,7 @@ const Status = { preview: null, showPreview: false, showingTall: this.inConversation && this.focused, - showingTallSubject: false, + showingLongSubject: false, expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined' ? !this.$store.state.instance.collapseMessageWithSubject : !this.$store.state.config.collapseMessageWithSubject, @@ -130,9 +130,8 @@ const Status = { const lengthScore = this.status.statusnet_html.split(/ 20 }, - tallSubject () { - const lengthScore = this.status.summary.length / 80 - return lengthScore > 10 + longSubject () { + return this.status.summary.length > 900 }, isReply () { return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index fdeda42a..a06e6cee 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -85,10 +85,10 @@
-
- Show more +
Show more @@ -98,7 +98,7 @@ Show less
-
+