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(() => {
|
||||
if (!scrollObserverRef.current) {
|
||||
if (loading || !scrollObserverRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -228,6 +228,7 @@ export function MediaGallery({
|
|||
conversationId,
|
||||
haveOldestDocument,
|
||||
haveOldestMedia,
|
||||
loading,
|
||||
loadMoreDocuments,
|
||||
loadMoreMedia,
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue