Page MenuHomePhabricator

[native] Make sure we don't start message creation until thumbnail concludes
ClosedPublic

Authored by ashoat on Mar 29 2024, 12:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 14, 8:58 AM
Unknown Object (File)
Thu, Jun 13, 2:56 AM
Unknown Object (File)
Thu, Jun 6, 6:14 AM
Unknown Object (File)
Tue, Jun 4, 5:04 PM
Unknown Object (File)
Tue, Jun 4, 12:42 PM
Unknown Object (File)
Fri, May 31, 5:49 AM
Unknown Object (File)
May 7 2024, 3:49 PM
Unknown Object (File)
May 7 2024, 3:49 PM
Subscribers

Details

Summary

While testing ENG-7600, I noticed an issue where every time InputStateContainer.componentDidUpdate would run, the thumbnail for the video would get wiped from pendingUploads.

This was happening because the code in getCompletedUploads was erroneously including the pending thumbnail upload as completed, since it wasn't set up to notice it on the Media in the Redux store.

By updating the code in getCompletedUploads to be aware of this, we prevent the code in componentDidUpdate from removing thumbnails from the pendingUploads store. This has the effect of making sure we don't attempt to create the message until the thumbnail upload is concluded. This hasn't ever showed up as a problem probably because the thumbnail upload is always faster than the video upload.

Test Plan

Added some logs of pendingUploads, and made sure that the thumbnail upload was not removed until it actually concluded

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable