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
F3386333: D11475.id38550.diff
Fri, Nov 29, 4:15 AM
Unknown Object (File)
Sun, Nov 24, 3:26 PM
Unknown Object (File)
Sun, Nov 24, 1:46 PM
Unknown Object (File)
Wed, Nov 13, 5:47 PM
Unknown Object (File)
Wed, Nov 13, 12:34 AM
Unknown Object (File)
Wed, Nov 13, 12:05 AM
Unknown Object (File)
Wed, Nov 13, 12:04 AM
Unknown Object (File)
Tue, Nov 12, 10:08 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