Page MenuHomePhabricator

[native] Fix cropped avatar selection
ClosedPublic

Authored by bartek on Aug 5 2023, 10:37 AM.
Tags
None
Referenced Files
F3736529: D8739.id29568.diff
Thu, Jan 9, 6:12 AM
F3736528: D8739.id29561.diff
Thu, Jan 9, 6:12 AM
F3736455: D8739.id.diff
Thu, Jan 9, 6:11 AM
F3736323: D8739.diff
Thu, Jan 9, 6:03 AM
Unknown Object (File)
Fri, Jan 3, 7:13 PM
Unknown Object (File)
Dec 7 2024, 1:14 AM
Unknown Object (File)
Nov 21 2024, 8:52 AM
Unknown Object (File)
Nov 21 2024, 8:52 AM
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.