Profile: Bigger swipe interactive area (#1326)

This commit is contained in:
Alexander Zinchuk 2021-07-26 17:35:53 +03:00
parent 1a8df50987
commit c9d430a5cd

View File

@ -102,15 +102,12 @@ const PrivateChatInfo: FC<OwnProps & StateProps & DispatchProps> = ({
// Support for swipe gestures and closing on click
useEffect(() => {
const element = document.querySelector<HTMLDivElement>(
'.profile-slide-container > .active, .profile-slide-container > .to',
);
const element = document.querySelector<HTMLDivElement>('.photo-wrapper');
if (!element) {
return undefined;
}
return captureEvents(element, {
excludedClosestSelector: '.navigation',
onSwipe: IS_TOUCH_ENV ? (e, direction) => {
if (direction === SwipeDirection.Right) {
selectPreviousMedia();