import { type ChannelDetail } from "./api"; /** How often the channel page re-polls its detail (via useLiveQuery): every 4s while THIS user's * full-history backfill is running (`deep_requested && !backfill_done`) so the stored count + the * N/S/L breakdown climb on their own, and `false` (stop polling) once the back-catalogue is in or * the user never requested it. Extracted so the poll-or-stop decision is unit-testable. */ export const channelDetailPollMs = (d: ChannelDetail | undefined): number | false => d?.deep_requested && !d.backfill_done ? 4000 : false;