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

Added check for when card is swiped via ref function #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

salmanR107
Copy link

@salmanR107 salmanR107 commented May 19, 2023

Motivation:

We came across a use case in our project where we had to track whether the card was swiped by swiping or via a button that called the respective ref function that would swipe the card by itself. I've attached a video to show this action happening.

In the current implementation there was no way of knowing whether the card was swiped by the user themself or via the ref function, after the action takes place and we get a response from the back end. The basic flow is:
Swipe(button or gesture) => api call sent to back end => response received from back end => analytics query sent which includes an id returned in the response from the back end.

For that reason i added a third return value (isViaRef) to all swipe functions which returns true when any of the ref functions are called and false otherwise.

Video demonstration:

Screen.Recording.Swiper-.iPhone.14.Pro.mp4

@salmanR107
Copy link
Author

@webraptor Please review my PR.

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.

1 participant