cleanup
This commit is contained in:
@@ -10,8 +10,8 @@ export type StreamParticle = Particle & {
|
||||
properties: StreamProperties;
|
||||
};
|
||||
|
||||
const INITIAL_PAGE_SIZE = 3;
|
||||
const PAGE_INCREMENT = 3;
|
||||
const INITIAL_PAGE_SIZE = 12;
|
||||
const PAGE_INCREMENT = 12;
|
||||
|
||||
// Stable where-constraint references so the Firestore subscription only
|
||||
// re-attaches when the tab actually changes, not on every render.
|
||||
@@ -28,12 +28,7 @@ function useVisibilityScopes(userId?: string, networkId?: string) {
|
||||
}
|
||||
|
||||
interface UseStreamParticlesOptions {
|
||||
/**
|
||||
* Which streams to subscribe to. Open streams are loaded in full (bounded
|
||||
* by active work — full realtime coverage is needed for autoplay/huddles).
|
||||
* Closed streams are paginated via `loadMore`.
|
||||
*/
|
||||
// TODO: can't we paginate open streams, and if the top set changes then our auto-play would still trigger?
|
||||
// Which streams to subscribe to
|
||||
status: 'open' | 'closed';
|
||||
}
|
||||
|
||||
@@ -41,9 +36,9 @@ interface UseStreamParticlesResult {
|
||||
streams: StreamParticle[];
|
||||
isLoading: boolean;
|
||||
networkId: string;
|
||||
/** True when more closed streams may exist beyond the current window. */
|
||||
/** True when more streams may exist beyond the current window. */
|
||||
canLoadMore: boolean;
|
||||
/** Extend the pagination window. No-op on the open tab. */
|
||||
/** Extend the pagination window. */
|
||||
loadMore: () => void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user