HomePhabricator
Diffusion Comm a5767512279d

[native] Pull `displayFailureAlert` out of `EditUserAvatarProvider`

Description

[native] Pull displayFailureAlert out of EditUserAvatarProvider

Summary:
As part of making EditUserAvatarProvider "platform-agnostic" so it can be used across web and native, we're pulling displayFailureAlert (which uses react-native:Alert.alert(...)) out of EditUserAvatarProvider.

We will similarly need to pass selectFromGallery(...) and useUploadSelectedMedia as props to make EditUserAvatarProvider "fully" platform-agnostic.

Test Plan:

  1. Killed keyserver to ensure update avatar request would fail
  2. Ensured that Alert was displayed on native as expected:

Simulator Screenshot - iPhone 14 Pro - 2023-06-14 at 14.16.51.png (2×1 px, 597 KB)

Reviewers: ashoat, ginsu

Reviewed By: ginsu

Subscribers: tomek

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

Details