diff options
| author | lambadalambda <gitgud@rogerbraun.net> | 2017-06-05 06:19:41 -0400 |
|---|---|---|
| committer | lambadalambda <gitgud@rogerbraun.net> | 2017-06-05 06:19:41 -0400 |
| commit | 449a466ef2a071db07fb63dddf5b7dad704000ec (patch) | |
| tree | ef75d940d4f573aa233ca114c1ebd4619d13dcd2 /src/components/status/status.js | |
| parent | a4493f05d319e31d677dcf9cf0835d945e37e998 (diff) | |
| parent | 9af18e014d5bd6d342e6741927e37cb787d63458 (diff) | |
Merge branch 'feature/two-way-reply-navigation' into 'develop'
Feature/two way reply navigation
See merge request !88
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 183838a8..9448b64b 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -13,7 +13,8 @@ const Status = { 'inConversation', 'focused', 'highlight', - 'compact' + 'compact', + 'replies' ], data: () => ({ replying: false, @@ -87,9 +88,9 @@ const Status = { toggleReplying () { this.replying = !this.replying }, - gotoOriginal () { + gotoOriginal (id) { // only handled by conversation, not status_or_conversation - this.$emit('goto', this.status.in_reply_to_status_id) + this.$emit('goto', id) }, toggleExpanded () { this.$emit('toggleExpanded') @@ -108,9 +109,8 @@ const Status = { let rect = this.$el.getBoundingClientRect() if (rect.top < 100) { window.scrollBy(0, rect.top - 200) - } else if (rect.bottom > window.innerHeight - 100) { - // will be useful when scrolling down to replies or root posts is in - window.scrollBy(0, rect.bottom + 200) + } else if (rect.bottom > window.innerHeight - 50) { + window.scrollBy(0, rect.bottom - window.innerHeight + 50) } } } |
