diff --git a/src/components/friends_timeline/friends_timeline.vue b/src/components/friends_timeline/friends_timeline.vue
index 03e518c6..af8ba5fe 100644
--- a/src/components/friends_timeline/friends_timeline.vue
+++ b/src/components/friends_timeline/friends_timeline.vue
@@ -2,7 +2,7 @@
diff --git a/src/components/public_timeline/public_timeline.vue b/src/components/public_timeline/public_timeline.vue
index 4aab0943..22a2a2b8 100644
--- a/src/components/public_timeline/public_timeline.vue
+++ b/src/components/public_timeline/public_timeline.vue
@@ -2,7 +2,7 @@
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index fd36d0db..433bca11 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -2,10 +2,16 @@ import Status from '../status/status.vue'
const Timeline = {
props: [
- 'timeline'
+ 'timeline',
+ 'timelineName'
],
components: {
Status
+ },
+ methods: {
+ showNewStatuses () {
+ this.$store.commit('showNewStatuses', { timeline: this.timelineName })
+ }
}
}
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index 562656f6..216982f6 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -1,5 +1,12 @@
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 8109d906..dc0b224b 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -1,4 +1,4 @@
-import { last, intersectionBy, sortBy, unionBy, toInteger, groupBy, differenceBy, each, find } from 'lodash'
+import { slice, last, intersectionBy, sortBy, unionBy, toInteger, groupBy, differenceBy, each, find } from 'lodash'
// import moment from 'moment'
const defaultState = {
@@ -93,6 +93,12 @@ const statuses = {
addNewStatuses (state, { statuses, showImmediately = false, timeline }) {
state.timelines[timeline] = addStatusesToTimeline(statuses, showImmediately, state.timelines[timeline])
state.allStatuses = unionBy(state.timelines[timeline].statuses, state.allStatuses.id)
+ },
+ showNewStatuses (state, { timeline }) {
+ const oldTimeline = (state.timelines[timeline])
+
+ oldTimeline.newStatusCount = 0
+ oldTimeline.visibleStatuses = slice(oldTimeline.statuses, 0, 50)
}
}
}