aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status/status.js')
-rw-r--r--src/components/status/status.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 681d0373..558125df 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -32,7 +32,7 @@ const Status = {
userExpanded: false,
preview: null,
showPreview: false,
- showingTall: false,
+ showingTall: this.inConversation && this.focused,
expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined'
? !this.$store.state.instance.collapseMessageWithSubject
: !this.$store.state.config.collapseMessageWithSubject,
@@ -126,7 +126,7 @@ const Status = {
return lengthScore > 20
},
isReply () {
- return !!this.status.in_reply_to_status_id
+ return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id)
},
replyToName () {
const user = this.$store.state.users.usersObject[this.status.in_reply_to_user_id]
@@ -266,11 +266,11 @@ const Status = {
toggleShowMore () {
if (this.showingTall) {
this.showingTall = false
- } else if (this.expandingSubject) {
+ } else if (this.expandingSubject && this.status.summary) {
this.expandingSubject = false
} else if (this.hideTallStatus) {
this.showingTall = true
- } else if (this.hideSubjectStatus) {
+ } else if (this.hideSubjectStatus && this.status.summary) {
this.expandingSubject = true
}
},
@@ -303,8 +303,10 @@ const Status = {
'highlight': function (id) {
if (this.status.id === id) {
let rect = this.$el.getBoundingClientRect()
- if (rect.top < 100) {
+ if (rect.top < 140) {
window.scrollBy(0, rect.top - 200)
+ } else if (rect.top < window.innerHeight && rect.height >= (window.innerHeight - 50)) {
+ window.scrollBy(0, rect.top - 50)
} else if (rect.bottom > window.innerHeight - 50) {
window.scrollBy(0, rect.bottom - window.innerHeight + 50)
}