this repo has no description
0
fork

Configure Feed

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

Fix child replies accidentally got GC-ed

+14 -4
+14 -4
src/pages/status.jsx
··· 901 901 return STATUS_URL_REGEX.test(states.prevLocation?.pathname); 902 902 }, [sKey]); 903 903 904 + const moreStatusesKeys = useMemo(() => { 905 + if (!showMore) return []; 906 + const ids = []; 907 + function getIDs(status) { 908 + ids.push(status.id); 909 + if (status.replies) { 910 + status.replies.forEach(getIDs); 911 + } 912 + } 913 + statuses.slice(limit).forEach(getIDs); 914 + return ids.map((id) => statusKey(id, instance)); 915 + }, [showMore, statuses, limit, instance]); 916 + 904 917 return ( 905 918 <div 906 919 tabIndex="-1" ··· 1156 1169 disabled={uiState === 'loading'} 1157 1170 onClick={() => setLimit((l) => l + LIMIT)} 1158 1171 style={{ marginBlockEnd: '6em' }} 1159 - data-state-post-ids={statuses 1160 - .slice(limit) 1161 - .map((s) => statusKey(s.id, instance)) 1162 - .join(' ')} 1172 + data-state-post-ids={moreStatusesKeys.join(' ')} 1163 1173 > 1164 1174 <div class="ib avatars-bunch"> 1165 1175 {/* show avatars for first 5 statuses */}