Merge branch 'status-list-null' into 'develop'

StatusList: don't push null item to Virtuoso (LoadGap)

See merge request soapbox-pub/soapbox!2283
This commit is contained in:
Alex Gleason 2023-02-14 20:21:21 +00:00
commit 6fc8b181e6
1 changed files with 5 additions and 1 deletions

View File

@ -192,7 +192,11 @@ const StatusList: React.FC<IStatusList> = ({
} }
if (statusId === null) { if (statusId === null) {
acc.push(renderLoadGap(index)); const gap = renderLoadGap(index);
// one does not simply push a null item to Virtuoso: https://github.com/petyosi/react-virtuoso/issues/206#issuecomment-747363793
if (gap) {
acc.push(gap);
}
} else if (statusId.startsWith('末suggestions-')) { } else if (statusId.startsWith('末suggestions-')) {
if (soapboxConfig.feedInjection) { if (soapboxConfig.feedInjection) {
acc.push(renderFeedSuggestions()); acc.push(renderFeedSuggestions());