lint fixup
This commit is contained in:
parent
29761d8e45
commit
2d640945a3
|
@ -6,7 +6,7 @@ import { scheduleIdleTask } from '../_utils/scheduleIdleTask'
|
||||||
import throttle from 'lodash/throttle'
|
import throttle from 'lodash/throttle'
|
||||||
import { mark, stop } from '../_utils/marks'
|
import { mark, stop } from '../_utils/marks'
|
||||||
|
|
||||||
async function getReblogIds(instanceName, statusIds) {
|
async function getReblogIds (instanceName, statusIds) {
|
||||||
let reblogIds = await Promise.all(statusIds.map(async timelineItemId => {
|
let reblogIds = await Promise.all(statusIds.map(async timelineItemId => {
|
||||||
let status = await database.getStatus(instanceName, timelineItemId)
|
let status = await database.getStatus(instanceName, timelineItemId)
|
||||||
return status.reblog && status.reblog.id
|
return status.reblog && status.reblog.id
|
||||||
|
@ -14,7 +14,7 @@ async function getReblogIds(instanceName, statusIds) {
|
||||||
return reblogIds.filter(identity)
|
return reblogIds.filter(identity)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getExistingItemIdsSet(instanceName, timelineName) {
|
async function getExistingItemIdsSet (instanceName, timelineName) {
|
||||||
let timelineItemIds = store.getForTimeline(instanceName, timelineName, 'timelineItemIds') || []
|
let timelineItemIds = store.getForTimeline(instanceName, timelineName, 'timelineItemIds') || []
|
||||||
if (timelineName === 'notifications') {
|
if (timelineName === 'notifications') {
|
||||||
return new Set(timelineItemIds)
|
return new Set(timelineItemIds)
|
||||||
|
@ -56,14 +56,14 @@ const lazilyProcessFreshUpdates = throttle((instanceName, timelineName) => {
|
||||||
})
|
})
|
||||||
}, 5000)
|
}, 5000)
|
||||||
|
|
||||||
function processUpdate(instanceName, timelineName, update) {
|
function processUpdate (instanceName, timelineName, update) {
|
||||||
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
||||||
freshUpdates.push(update)
|
freshUpdates.push(update)
|
||||||
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
|
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
|
||||||
lazilyProcessFreshUpdates(instanceName, timelineName)
|
lazilyProcessFreshUpdates(instanceName, timelineName)
|
||||||
}
|
}
|
||||||
|
|
||||||
function processDelete(instanceName, deletion) {
|
function processDelete (instanceName, deletion) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { updateLists } from '../_actions/lists'
|
||||||
import { createStream } from '../_actions/streaming'
|
import { createStream } from '../_actions/streaming'
|
||||||
|
|
||||||
export function instanceObservers (store) {
|
export function instanceObservers (store) {
|
||||||
|
|
||||||
// stream to watch for home timeline updates and notifications
|
// stream to watch for home timeline updates and notifications
|
||||||
let currentInstanceStream
|
let currentInstanceStream
|
||||||
|
|
||||||
|
@ -38,6 +37,5 @@ export function instanceObservers (store) {
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
window.currentInstanceStream = currentInstanceStream
|
window.currentInstanceStream = currentInstanceStream
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { updateInstanceInfo } from '../_actions/instances'
|
||||||
import { createStream } from '../_actions/streaming'
|
import { createStream } from '../_actions/streaming'
|
||||||
|
|
||||||
export function timelineObservers (store) {
|
export function timelineObservers (store) {
|
||||||
|
|
||||||
// stream to watch for local/federated/etc. updates. home and notification
|
// stream to watch for local/federated/etc. updates. home and notification
|
||||||
// updates are handled in timelineObservers.js
|
// updates are handled in timelineObservers.js
|
||||||
let currentTimelineStream
|
let currentTimelineStream
|
||||||
|
|
Loading…
Reference in a new issue