Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageList: swipe to go back #332

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ulugmer
Copy link

@ulugmer ulugmer commented Dec 21, 2023

Adding swipe left-to-right functionality for navigating back from the message list.

@ulugmer ulugmer changed the title Swipe to go back MessageList: swipe to go back Dec 21, 2023
@@ -215,6 +215,38 @@ const MessageList: FC<OwnProps & StateProps> = ({
memoFirstUnreadIdRef.current = firstUnreadId;
}, [firstUnreadId]);

useEffect(() => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

captureEvents: onSwipe is recommended for these purposes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR, I propose adding functionality to handle back swipes specifically for Touch Bar swipes. The onSwipe handler in captureEvents is designed for touch and mouse events and does not detect wheel events generated by the MacBook's Touch Bar. The Touch Bar's unique wheel events have different characteristics and thresholds, which are not compatible with the onSwipe logic that's tailored for touch and mouse gestures.

Copy link
Owner

@Ajaxy Ajaxy Dec 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I think that still needs to be handled within captureEvents module which already have this behavior for Media Viewer (onWheelDrag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants