Page MenuHomePhabricator

[native] Fix cropped avatar selection
ClosedPublic

Authored by bartek on Aug 5 2023, 10:37 AM.
Tags
None
Referenced Files
F3282530: D8739.id29561.diff
Sat, Nov 16, 11:10 AM
Unknown Object (File)
Tue, Oct 22, 6:36 AM
Unknown Object (File)
Tue, Oct 22, 6:36 AM
Unknown Object (File)
Tue, Oct 22, 6:35 AM
Unknown Object (File)
Tue, Oct 22, 5:03 AM
Unknown Object (File)
Oct 2 2024, 3:13 AM
Unknown Object (File)
Oct 1 2024, 1:59 AM
Unknown Object (File)
Sep 20 2024, 7:16 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
No Lint Coverage
Unit
No Test Coverage

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

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

160

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.