Skip to content

Commit 9d87595

Browse files
committed
Fix video can't play on RHP
1 parent bb81c86 commit 9d87595

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hooks/useCheckIfRouteHasRemainedUnchanged.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ function useCheckIfRouteHasRemainedUnchanged(videoUrl: string) {
5757
const route = navigationRef.getCurrentRoute();
5858
// If the app is launched with the attachment route, it will always remain on the report screen.
5959
// Thus, it can be considered as still being on the rendered route.
60-
isOnInitialRenderedRouteRef.current = route?.name === SCREENS.ATTACHMENTS;
60+
isOnInitialRenderedRouteRef.current = navigation.isFocused() || route?.name === SCREENS.ATTACHMENTS;
6161
});
62+
// eslint-disable-next-line react-compiler/react-compiler
63+
// eslint-disable-next-line react-hooks/exhaustive-deps
6264
}, []);
6365

6466
useEffect(() => {

0 commit comments

Comments
 (0)