MediaGallery: Don't create scroll observer if we're still loading
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
eb430c46b0
commit
d034bd6a08
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,7 @@ export function MediaGallery({
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!scrollObserverRef.current) {
|
if (loading || !scrollObserverRef.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +228,7 @@ export function MediaGallery({
|
||||||
conversationId,
|
conversationId,
|
||||||
haveOldestDocument,
|
haveOldestDocument,
|
||||||
haveOldestMedia,
|
haveOldestMedia,
|
||||||
|
loading,
|
||||||
loadMoreDocuments,
|
loadMoreDocuments,
|
||||||
loadMoreMedia,
|
loadMoreMedia,
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue