Page MenuHomePhabricator

[native] Fix cropped avatar selection
ClosedPublic

Authored by bartek on Aug 5 2023, 10:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 20, 7:16 AM
Unknown Object (File)
Fri, Sep 20, 7:16 AM
Unknown Object (File)
Fri, Sep 20, 7:16 AM
Unknown Object (File)
Mon, Sep 2, 3:52 PM
Unknown Object (File)
Aug 29 2024, 9:05 AM
Unknown Object (File)
Jul 28 2024, 11:17 AM
Unknown Object (File)
Jul 16 2024, 10:10 PM
Unknown Object (File)
Jul 16 2024, 2:06 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.