-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add support for finger unlock activities #186
Conversation
"id": "e05b1c22-71d1-44b8-8a4c-e729174a8972", | ||
"timestamp": 1726770544000, | ||
"icon": "https://d33mytkkohwnk6.cloudfront.net/app/ActivityFeedIcons/finger_unlock@3x.png", | ||
"action": "finger_unlock", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to lock with finger as well?
ie is there a finger_lock
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! I wasn't expecting there would be, as there isn't a pin_lock
action defined in the code. However, after testing, I discovered that there are finger_lock
and pin_lock
actions. I have added support for the finger_lock
action in this PR, and I will open another PR to add the pin_lock
action.
@@ -137,6 +139,7 @@ | |||
ACTION_LOCK_ONETOUCHLOCK_2, | |||
ACTION_LOCK_PIN_UNLATCH, | |||
ACTION_LOCK_PIN_UNLOCK, | |||
ACTION_LOCK_FINGER_UNLOCK, | |||
} | |||
REMOTE_ACTIONS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACTIVITY_TO_FIRST_LAST_NAME needs to be added for cases where the user isn't sent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add these new actions to ACTIVITY_TO_FIRST_LAST_NAME
because I didn't see ACTION_LOCK_PIN_UNLOCK
added, and the functionality of the actions seemed the same. Is it necessary to add these actions to the dictionary? If so, do we also need to add the ACTION_LOCK_PIN_*
actions to the dictionary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there are rare cases where the api doesn't return a user and we need a fallback. The Pin unlocks will probably break in this case unless we add them (or show an empty string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I have added the fingerprint actions to ACTIVITY_TO_FIRST_LAST_NAME
map. I will create a separate PR to add the pin actions as well.
1806c75
to
3ee93ab
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
- Coverage 72.48% 72.27% -0.21%
==========================================
Files 31 31
Lines 2293 2294 +1
Branches 396 378 -18
==========================================
- Hits 1662 1658 -4
- Misses 569 572 +3
- Partials 62 64 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4512c15
to
0ad2532
Compare
Thanks @sfelf |
Closes #185