HomePhabricator
Diffusion Comm 76cb245bec51

[native] Create a ChangeRolesHeaderRightButton to save role changes

Description

[native] Create a ChangeRolesHeaderRightButton to save role changes

Summary:
This diff creates the 'save' headerRight component that is used to actually process the role change. When save is clicked, one of two things happen:

(1) If a member's role is changed, change the role and close the screen

(2) If a member's role remains unchanged, just close the screen

Because the save button is located in the react navigation header component, the best way I found to handle keeping track of the data from the role change screen was to access the info from route.params
after the role change screen sets them via navigation.setParams. If there is a better way to do this though, I'm open to changing this approach. I used this github issue as a reference for this approach.

Depends on D8159

Test Plan:
Please see the video below showing changing a member's role

Reviewers: atul, ginsu, tomek

Reviewed By: atul

Subscribers: ashoat

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

Details

Provenance
rohanAuthored on Jun 13 2023, 12:16 PM
Reviewer
atul
Differential Revision
D8160: [native] Create a ChangeRolesHeaderRightButton to save role changes
Parents
rCOMM1dae2e974e2c: [native] Handle unsaved changes when 'cancel' is pressed
Branches
Unknown
Tags
Unknown