Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reduce polling when app is backgrounded (#4192)

authored by

Eric Bailey and committed by
GitHub
9011c11e d0516143

+8 -1
+7 -1
src/state/messages/events/agent.ts
··· 4 4 5 5 import {networkRetry} from '#/lib/async/retry' 6 6 import {logger} from '#/logger' 7 - import {DEFAULT_POLL_INTERVAL} from '#/state/messages/events/const' 7 + import { 8 + BACKGROUND_POLL_INTERVAL, 9 + DEFAULT_POLL_INTERVAL, 10 + } from '#/state/messages/events/const' 8 11 import { 9 12 MessagesEventBusDispatch, 10 13 MessagesEventBusDispatchEvent, ··· 286 289 const requested = Array.from(this.requestedPollIntervals.values()) 287 290 const lowest = Math.min(DEFAULT_POLL_INTERVAL, ...requested) 288 291 return lowest 292 + } 293 + case MessagesEventBusStatus.Backgrounded: { 294 + return BACKGROUND_POLL_INTERVAL 289 295 } 290 296 default: 291 297 return DEFAULT_POLL_INTERVAL
+1
src/state/messages/events/const.ts
··· 1 1 export const DEFAULT_POLL_INTERVAL = 20e3 2 + export const BACKGROUND_POLL_INTERVAL = 60e3