Skip to content

Commit

Permalink
Add screen focus check to educational tooltip visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ishpaul777 committed Jan 7, 2025
1 parent 2895818 commit c7a9752
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {useIsFocused} from '@react-navigation/native';
import lodashDebounce from 'lodash/debounce';
import noop from 'lodash/noop';
import React, {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react';
Expand Down Expand Up @@ -135,10 +136,11 @@ function ReportActionCompose({
const personalDetails = usePersonalDetails();
const [blockedFromConcierge] = useOnyx(ONYXKEYS.NVP_BLOCKED_FROM_CONCIERGE);
const [shouldShowComposeInput = true] = useOnyx(ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT);
const isScreenFocused = useIsFocused();

const {renderProductTrainingTooltip, hideProductTrainingTooltip, shouldShowProductTrainingTooltip} = useProductTrainingContext(
CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.WORKSAPCE_CHAT_CREATE,
shouldShowEducationalTooltip,
shouldShowEducationalTooltip && isScreenFocused,
);

/**
Expand Down

0 comments on commit c7a9752

Please sign in to comment.