refs #197 Sometimes archive old statuses when stream updated
This commit is contained in:
parent
9c502b1a22
commit
575a9eb043
|
@ -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 })
|
||||||
|
|
Loading…
Reference in New Issue