diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-07-06 10:45:47 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-07-06 10:45:47 +0300 |
| commit | afdc3f96f0cd83a2f977992f68a30d7a531df7de (patch) | |
| tree | 9db58232bb5db7c9f3956e1741534990aba11aa1 /src/components/timeline/timeline.js | |
| parent | 61f34ff361a24a287ac0bf0c79fd2f77b4f2b708 (diff) | |
| parent | b761bcf3334e1f464e63a87de40eb75d0906d545 (diff) | |
fix conflicts, make subject update the preview
Diffstat (limited to 'src/components/timeline/timeline.js')
| -rw-r--r-- | src/components/timeline/timeline.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 9a53acd6..bac73022 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -45,11 +45,15 @@ const Timeline = { newStatusCount () { return this.timeline.newStatusCount }, - newStatusCountStr () { + showLoadButton () { + if (this.timelineError || this.errorData) return false + return this.timeline.newStatusCount > 0 || this.timeline.flushMarker !== 0 + }, + loadButtonString () { if (this.timeline.flushMarker !== 0) { - return '' + return this.$t('timeline.reload') } else { - return ` (${this.newStatusCount})` + return `${this.$t('timeline.show_new')} (${this.newStatusCount})` } }, classes () { @@ -112,8 +116,6 @@ const Timeline = { if (e.key === '.') this.showNewStatuses() }, showNewStatuses () { - if (this.newStatusCount === 0) return - if (this.timeline.flushMarker !== 0) { this.$store.commit('clearTimeline', { timeline: this.timelineName, excludeUserId: true }) this.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 }) @@ -135,7 +137,7 @@ const Timeline = { showImmediately: true, userId: this.userId, tag: this.tag - }).then(statuses => { + }).then(({ statuses }) => { store.commit('setLoading', { timeline: this.timelineName, value: false }) if (statuses && statuses.length === 0) { this.bottomedOut = true |
