Skip to content

Remove setTimeout usage in AttachmentPicker/index.native.js #2719

Description

@kidroca

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Expected Result:

The Attachment Picker modal should work correctly without the need of setTimeout

Actual Result:

setTimeout is needed because on iOS the Gallery/Camera is immediately dismissed when the Attachment bottom docked modal closes

Details

This is a follow up on #2656 (comment)
It can potentially be resolved by updating the attachment related libraries handled in this ticket: #2531

Action Performed:

  1. Open a chat
  2. Select (+) button to add an attachment
  3. Select gallery
  4. Sometimes the gallery would open and immediately close or not open at all

Workaround:

Added a brief timeout so that the Camera/Gallery is only opened a 1-2 frames after the Attachment Picker modal closes

Platform:

Where is this issue occurring?

  • Web
  • ✅ iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.0.38-1
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions