Wraps BaseEditUserAvatarProvider and passes in native-specific props.
Sorry this diff is a little noisy, the main changes are in root.react.js and native-edit-thread-user-avatar-provider.react.js, rest are mostly import fixes.
Depends on D8216
Paths
| Differential D8217 Authored by atul on Jun 14 2023, 12:29 PM.
Details Summary Wraps BaseEditUserAvatarProvider and passes in native-specific props. Sorry this diff is a little noisy, the main changes are in root.react.js and native-edit-thread-user-avatar-provider.react.js, rest are mostly import fixes. Depends on D8216 Test Plan Everything continues to work as expected on native.
Diff Detail
Event TimelineHerald added a subscriber: tomek. · View Herald TranscriptJun 14 2023, 12:29 PM2023-06-14 12:29:18 (UTC-7) Harbormaster completed remote builds in B20272: Diff 27789.Jun 14 2023, 12:49 PM2023-06-14 12:49:37 (UTC-7) This revision is now accepted and ready to land.Jun 14 2023, 1:10 PM2023-06-14 13:10:51 (UTC-7) Closed by commit rCOMM9a1d07449411: [native] Introduce `NativeEditUserAvatarProvider` (authored by atul). · Explain WhyJun 14 2023, 2:22 PM2023-06-14 14:22:45 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 27789 lib/components/base-edit-user-avatar-provider.react.js
lib/components/edit-user-avatar-provider.react.js
native/account/registration/avatar-selection.react.js
native/account/registration/emoji-avatar-selection.react.js
|
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.