From 06cf8628e54a30c5dd9dff153408f9641b8dad00 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Sun, 3 Feb 2019 23:47:26 -0500
Subject: shorten incredibly long content warning or subject

---
 src/components/status/status.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/components/status/status.vue')

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 @@
             </div>
           </div>
 
-          <div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper">
+          <div class="status-content-wrapper" :class="{ 'tall-status': !showingTallSubject }" v-if="tallSubject">
+            <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingTallSubject" href="#" @click.prevent="showingTallSubject=true">Show more</a>
+            <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html"></div>
+            <a v-if="showingTallSubject" href="#" class="status-unhider" @click.prevent="showingTallSubject=false">Show less</a>
+          </div>
+          <div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper" v-else>
             <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">Show more</a>
             <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html" v-if="!hideSubjectStatus"></div>
             <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.summary_html" v-else></div>
-- 
cgit v1.2.3-70-g09d2


From 887f1def2e1b8c052ddf2425f192502211c3013e Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Mon, 4 Feb 2019 03:16:55 -0500
Subject: handle poster attachment with tall subjects

---
 src/components/status/status.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/status/status.vue')

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 @@
             <a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">Show less</a>
           </div>
 
-          <div v-if="status.attachments && !hideSubjectStatus" class="attachments media-body">
+          <div v-if="status.attachments && (!hideSubjectStatus || showingTallSubject)" class="attachments media-body">
             <attachment
               class="non-gallery"
               v-for="attachment in nonGalleryAttachments"
-- 
cgit v1.2.3-70-g09d2


From 9d72c7e1bd935b4a308fe2221344edf156288894 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Mon, 4 Feb 2019 09:28:14 -0500
Subject: #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(-)

(limited to 'src/components/status/status.vue')

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(/<p|<br/).length + this.status.text.length / 80
       return lengthScore > 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 @@
             </div>
           </div>
 
-          <div class="status-content-wrapper" :class="{ 'tall-status': !showingTallSubject }" v-if="tallSubject">
-            <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingTallSubject" href="#" @click.prevent="showingTallSubject=true">Show more</a>
+          <div class="status-content-wrapper" :class="{ 'tall-status': !showingLongSubject }" v-if="longSubject">
+            <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingLongSubject" href="#" @click.prevent="showingLongSubject=true">Show more</a>
             <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html"></div>
-            <a v-if="showingTallSubject" href="#" class="status-unhider" @click.prevent="showingTallSubject=false">Show less</a>
+            <a v-if="showingLongSubject" href="#" class="status-unhider" @click.prevent="showingLongSubject=false">Show less</a>
           </div>
           <div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper" v-else>
             <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">Show more</a>
@@ -98,7 +98,7 @@
             <a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">Show less</a>
           </div>
 
-          <div v-if="status.attachments && (!hideSubjectStatus || showingTallSubject)" class="attachments media-body">
+          <div v-if="status.attachments && (!hideSubjectStatus || showingLongSubject)" class="attachments media-body">
             <attachment
               class="non-gallery"
               v-for="attachment in nonGalleryAttachments"
-- 
cgit v1.2.3-70-g09d2

