You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To disable polling when sorting by something besides timestamp, modify the useEffect hook in frontend/src/util/search.ts. Add a condition to check the sorting criteria and skip polling if it's not by timestamp.
useEffect(()=>{if(skip||sortingCriteria!=='timestamp'){return}// setup a polling interval for sessions after the current date rangeconstpoll=async()=>{constvariables=variableFn()if(variables===undefined){log('search.ts','skipping polling for custom time selection')pollTimeout.current=setTimeout(poll,POLL_INTERVAL,)asunknownasnumberreturn}constcurrentTimeout=pollTimeout.currentconstresult=awaitmoreDataQuery({ variables })if(pollTimeout.current===currentTimeout){constcount=getResultCount(result)if(count!==undefined){setNumMore(count)}pollTimeout.current=setTimeout(poll,POLL_INTERVAL,)asunknownasnumber}}pollTimeout.current=setTimeout(poll,POLL_INTERVAL,)asunknownasnumberreturn()=>{setNumMore(0)clearTimeout(pollTimeout.current)pollTimeout.current=undefined}},[getResultCount,moreDataQuery,variableFn,skip,sortingCriteria])
Talked this over w/ @zane and we agreed it probably wasn't that useful and potentially misleading.
The text was updated successfully, but these errors were encountered: