mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Mark viewed infinite loop (#1386)
* Bumped minimum required node version to 18.17 b/c of @react-native-camera-roll/camera-roll@7.5.2 * Prevent infinite useEffect loop in useMarkViewedMutation
This commit is contained in:
@@ -63,7 +63,7 @@ const useMarkViewedMutation = (
|
||||
);
|
||||
|
||||
useEffect( ( ) => {
|
||||
if ( !remoteObservation && isMarkingViewed ) { return; }
|
||||
if ( !remoteObservation || isMarkingViewed ) { return; }
|
||||
if ( localObservation?.unviewed( ) === true ) {
|
||||
setIsMarkingViewed( true );
|
||||
markViewedMutation.mutate( { id: uuid } );
|
||||
|
||||
Reference in New Issue
Block a user