Fix notifications indicator not going away after viewed obs (#1333)

This commit is contained in:
Angie
2024-03-28 15:06:53 -07:00
committed by GitHub
parent f1f852a66b
commit 48db4580d0
3 changed files with 16 additions and 4 deletions

View File

@@ -788,4 +788,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 77ed9526d4011b245ce5afa1ea331dea4c67d753
COCOAPODS: 1.14.3
COCOAPODS: 1.14.2

View File

@@ -978,7 +978,11 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
@@ -1047,7 +1051,11 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@@ -245,7 +245,11 @@ const ObsDetailsContainer = ( ): Node => {
markViewedLocally( );
queryClient.invalidateQueries( [fetchObservationUpdatesKey] );
refetchObservationUpdates( );
setObservationMarkedAsViewedAt( new Date( ) );
// make sure we dont ask api the number of notifications
// until its ready to return an accurate result
setTimeout( () => { setObservationMarkedAsViewedAt( new Date( ) ); }, 2000 );
setTimeout( () => { setObservationMarkedAsViewedAt( new Date( ) ); }, 5000 );
}
}
);