refs #197 Sometimes archive old statuses when stream updated

This commit is contained in:
AkiraFukushima 2018-04-21 01:21:45 +09:00
parent 9c502b1a22
commit 575a9eb043
1 changed files with 2 additions and 3 deletions

View File

@ -81,8 +81,7 @@ const TimelineSpace = {
ipcRenderer.on('update-start-user-streaming', (event, update) => { ipcRenderer.on('update-start-user-streaming', (event, update) => {
commit('TimelineSpace/Contents/Home/appendTimeline', update, { root: true }) commit('TimelineSpace/Contents/Home/appendTimeline', update, { root: true })
// Sometimes archive old statuses // Sometimes archive old statuses
// TODO: random if (rootState.TimelineSpace.Contents.Home.heading && Math.random() > 0.8) {
if (rootState.TimelineSpace.Contents.Home.heading) {
commit('TimelineSpace/Contents/Home/archiveTimeline', null, { root: true }) commit('TimelineSpace/Contents/Home/archiveTimeline', null, { root: true })
} }
commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', true, { root: true }) commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', true, { root: true })
@ -93,7 +92,7 @@ const TimelineSpace = {
router.push(`/${account._id}/notifications`) router.push(`/${account._id}/notifications`)
} }
commit('TimelineSpace/Contents/Notifications/appendNotifications', notification, { root: true }) commit('TimelineSpace/Contents/Notifications/appendNotifications', notification, { root: true })
if (rootState.TimelineSpace.Contents.Notifications.heading) { if (rootState.TimelineSpace.Contents.Notifications.heading && Math.random() > 0.8) {
commit('TimelineSpace/Contents/Notifications/archiveNotifications', null, { root: true }) commit('TimelineSpace/Contents/Notifications/archiveNotifications', null, { root: true })
} }
commit('TimelineSpace/SideMenu/changeUnreadNotifications', true, { root: true }) commit('TimelineSpace/SideMenu/changeUnreadNotifications', true, { root: true })