HomePhabricator
Diffusion Comm 39a557c86168

[native] fix Android cancel action sheet crash

Description

[native] fix Android cancel action sheet crash

Summary: While testing the edit avatar flow for android, I encountered this bug where the app crashes when the user presses anywhere outside the actionsheet. The reason for this is that the value of selectedIndex when a user tries to cancel on android is -1, and the value of selectedIndex when a user tries to cancel on iOS is 0. This is due to action sheets on android generally not having a cancel option in the sheet but there being a cancel option with iOS

Test Plan:
No longer triggering the crash, and we are getting the expected cancel behavior. Also double checked that iOS still behaves as expected

Before:

After:

Reviewers: ashoat, atul

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7456

Details

Provenance
ginsuAuthored on Apr 16 2023, 3:38 PM
Reviewer
ashoat
Differential Revision
D7456: [native] fix Android cancel action sheet crash
Parents
rCOMMb367a4710322: [keyserver] Fix `avatarUpdateQuery`
Branches
Unknown
Tags
Unknown