File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
package/src/components/ChannelList/hooks Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,13 @@ export const usePaginatedChannels = <
300300 loadingChannels :
301301 activeQueryType . current === 'queryLocalDB'
302302 ? true
303- : pagination ?. isLoading || ( ! ready && channels . length === 0 ) ,
303+ : // Although channels.length === 0 should come as a given when we have !ready,
304+ // due to the way offline storage works currently we have to do this additional
305+ // check to make sure channels were not populated before the reactive list becomes
306+ // ready. I do not like providing a way to set the ready state, as it should be managed
307+ // in the LLC entirely. Once we move offline support to the LLC, we can remove this check
308+ // too as it'll be redundant.
309+ pagination ?. isLoading || ( ! ready && channels . length === 0 ) ,
304310 loadingNextPage : pagination ?. isLoadingNext ,
305311 loadNextPage : channelManager . loadNext ,
306312 ready,
You can’t perform that action at this time.
0 commit comments