[INJIMOB-781] fix rendering issue for downloaded vc target point

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>
This commit is contained in:
srikanth716
2024-05-28 19:06:41 +05:30
parent ec88ecb5e2
commit cf05d7ef93
2 changed files with 15 additions and 3 deletions

View File

@@ -10,10 +10,16 @@ export const CopilotTooltip = () => {
const controller = UseCopilotTooltip();
controller.copilotEvents.on('stop', () => {
if (controller.CURRENT_STEP <= COPILOT_PRE_FINAL_STEP) {
if (
controller.CURRENT_STEP <= COPILOT_PRE_FINAL_STEP &&
controller.isOnboarding
) {
controller.ONBOARDING_DONE();
}
if (controller.CURRENT_STEP === COPILOT_FINAL_STEP) {
if (
controller.CURRENT_STEP === COPILOT_FINAL_STEP &&
controller.isInitialDownloading
) {
controller.INITIAL_DOWNLOAD_DONE();
}
});

View File

@@ -2,7 +2,11 @@ import {useCopilot} from 'react-native-copilot';
import {COPILOT_FINAL_STEP} from '../shared/constants';
import {useContext} from 'react';
import {GlobalContext} from '../shared/GlobalContext';
import {AuthEvents, selectIsInitialDownload} from '../machines/auth';
import {
AuthEvents,
selectIsInitialDownload,
selectIsOnboarding,
} from '../machines/auth';
import {useSelector} from '@xstate/react';
export const UseCopilotTooltip = () => {
@@ -22,6 +26,7 @@ export const UseCopilotTooltip = () => {
const ONBOARDING_DONE = () => authService?.send(AuthEvents.ONBOARDING_DONE());
const INITIAL_DOWNLOAD_DONE = () =>
authService?.send(AuthEvents.INITIAL_DOWNLOAD_DONE());
const isOnboarding = useSelector(authService, selectIsOnboarding);
const isInitialDownloading = useSelector(
authService,
selectIsInitialDownload,
@@ -51,6 +56,7 @@ export const UseCopilotTooltip = () => {
totalStepsNumber,
copilotEvents,
stepCount,
isOnboarding,
isInitialDownloading,
INITIAL_DOWNLOAD_DONE,
ONBOARDING_DONE,