Page MenuHomePhabricator

[native] Fix cropped avatar selection
ClosedPublic

Authored by bartek on Aug 5 2023, 10:37 AM.
Tags
None
Referenced Files
F2111584: D8739.id.diff
Tue, Jun 25, 11:26 PM
F2111270: D8739.id29561.diff
Tue, Jun 25, 10:25 PM
Unknown Object (File)
Mon, Jun 24, 2:53 AM
Unknown Object (File)
Wed, Jun 12, 5:19 AM
Unknown Object (File)
Mon, Jun 10, 7:24 PM
Unknown Object (File)
May 16 2024, 5:29 AM
Unknown Object (File)
May 8 2024, 10:34 AM
Unknown Object (File)
Apr 5 2024, 2:43 PM
Subscribers

Details

Summary

Fixes cropping part of ENG-4053.

Avoided replacing image URI with fetched asset URI when the file is in app's cache dir - this is where expo-image-picker stores cropped images.

Test Plan

Set cropped photo as an avatar - it is set correctly. Sent multimedia both with media gallery and image picker - both ways work. Checked both iOS and Android.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 5 2023, 10:56 AM
bartek added inline comments.
native/media/file-utils.js
61 ↗(On Diff #29561)

Decided to rename this variable - IMO it's more clear what it actually is

160 ↗(On Diff #29561)

expo-image-picker uses a different cache directory than react-native-fs so needed to check this path separately

This revision is now accepted and ready to land.Aug 5 2023, 12:13 PM
This revision was automatically updated to reflect the committed changes.