Skip to content

Commit

Permalink
revert "useCanUseTouchScreen" changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Pader committed Aug 28, 2023
1 parent 05f22e5 commit 15fc3a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/components/Attachments/AttachmentCarousel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Navigation from '../../../libs/Navigation/Navigation';
import BlockingView from '../../BlockingViews/BlockingView';
import * as Illustrations from '../../Icon/Illustrations';
import variables from '../../../styles/variables';
import useCanUseTouchScreen from '../../../hooks/useCanUseTouchScreen';
import * as DeviceCapabilities from '../../../libs/DeviceCapabilities';

const viewabilityConfig = {
// To facilitate paging through the attachments, we want to consider an item "viewable" when it is
Expand All @@ -30,7 +30,7 @@ function AttachmentCarousel({report, reportActions, source, onNavigate, setDownl
const scrollRef = useRef(null);

const {windowWidth, isSmallScreenWidth} = useWindowDimensions();
const canUseTouchScreen = useCanUseTouchScreen();
const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen();

const [containerWidth, setContainerWidth] = useState(0);
const [page, setPage] = useState(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {useCallback, useEffect, useRef, useState} from 'react';
import CONST from '../../../CONST';
import * as DeviceCapabilities from '../../../libs/DeviceCapabilities';
import useCanUseTouchScreen from '../../../hooks/useCanUseTouchScreen';

function useCarouselArrows() {
const canUseTouchScreen = useCanUseTouchScreen();
const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen();
const [shouldShowArrows, setShouldShowArrowsInternal] = useState(canUseTouchScreen);
const autoHideArrowTimeout = useRef(null);

Expand Down
19 changes: 0 additions & 19 deletions src/hooks/useCanUseTouchScreen.js

This file was deleted.

0 comments on commit 15fc3a7

Please sign in to comment.