diff options
Diffstat (limited to 'src/components/status')
| -rw-r--r-- | src/components/status/status.js | 16 | ||||
| -rw-r--r-- | src/components/status/status.vue | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index f119f42e..15c2d029 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -97,6 +97,7 @@ const Status = { 'inProfile', 'profileUserId', + 'simpleTree', 'controlledThreadDisplayStatus', 'controlledToggleThreadDisplay', @@ -379,10 +380,9 @@ const Status = { }, toggleThreadDisplay () { this.controlledToggleThreadDisplay() - } - }, - watch: { - 'highlight': function (id) { + }, + scrollIfHighlighted (highlightId) { + const id = highlightId if (this.status.id === id) { let rect = this.$el.getBoundingClientRect() if (rect.top < 100) { @@ -396,6 +396,14 @@ const Status = { window.scrollBy(0, rect.bottom - window.innerHeight + 50) } } + } + }, + mounted () { + this.scrollIfHighlighted(this.highlight) + }, + watch: { + 'highlight': function (id) { + this.scrollIfHighlighted(id) }, 'status.repeat_num': function (num) { // refetch repeats when repeat_num is changed in any way diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 47d35de8..e4812711 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -220,7 +220,7 @@ /> </button> <button - v-if="inThreadForest && replies && replies.length && toggleThreadDisplay" + v-if="inThreadForest && replies && replies.length && !simpleTree" class="button-unstyled" :title="threadShowing ? $t('status.thread_hide') : $t('status.thread_show')" :aria-expanded="threadShowing ? 'true' : 'false'" @@ -233,7 +233,7 @@ /> </button> <button - v-if="dive" + v-if="dive && !simpleTree" class="button-unstyled" :title="$t('status.show_only_conversation_under_this')" @click.prevent="dive" |
