Profile: Bigger swipe interactive area (#1326)
This commit is contained in:
parent
1a8df50987
commit
c9d430a5cd
@ -102,15 +102,12 @@ const PrivateChatInfo: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
|
|
||||||
// Support for swipe gestures and closing on click
|
// Support for swipe gestures and closing on click
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const element = document.querySelector<HTMLDivElement>(
|
const element = document.querySelector<HTMLDivElement>('.photo-wrapper');
|
||||||
'.profile-slide-container > .active, .profile-slide-container > .to',
|
|
||||||
);
|
|
||||||
if (!element) {
|
if (!element) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return captureEvents(element, {
|
return captureEvents(element, {
|
||||||
excludedClosestSelector: '.navigation',
|
|
||||||
onSwipe: IS_TOUCH_ENV ? (e, direction) => {
|
onSwipe: IS_TOUCH_ENV ? (e, direction) => {
|
||||||
if (direction === SwipeDirection.Right) {
|
if (direction === SwipeDirection.Right) {
|
||||||
selectPreviousMedia();
|
selectPreviousMedia();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user