Skip to content

Commit

Permalink
fix: hide emoji picker once naivgating
Browse files Browse the repository at this point in the history
  • Loading branch information
truph01 committed Feb 11, 2025
1 parent 48520ec commit 2a24943
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import usePrevious from '@hooks/usePrevious';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import useViewportOffsetTop from '@hooks/useViewportOffsetTop';
import {hideEmojiPicker} from '@libs/actions/EmojiPickerAction';
import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
Expand Down Expand Up @@ -313,6 +314,13 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
const didSubscribeToReportLeavingEvents = useRef(false);
const [showSoftInputOnFocus, setShowSoftInputOnFocus] = useState(false);

useEffect(() => {
if (!prevIsFocused || isFocused) {
return;
}
hideEmojiPicker(true);
}, [prevIsFocused, isFocused]);

useEffect(() => {
if (!report?.reportID || shouldHideReport) {
wasReportAccessibleRef.current = false;
Expand Down

0 comments on commit 2a24943

Please sign in to comment.