Page MenuHomePhabricator

[native] have saving thread avatar loaders only appear for thread being updated
ClosedPublic

Authored by ginsu on Apr 27 2023, 3:47 PM.
Tags
None
Referenced Files
F2166381: D7679.id25900.diff
Tue, Jul 2, 4:11 AM
F2165814: D7679.id.diff
Tue, Jul 2, 2:46 AM
Unknown Object (File)
Mon, Jul 1, 4:44 AM
Unknown Object (File)
Sun, Jun 30, 10:43 PM
Unknown Object (File)
Thu, Jun 27, 6:47 PM
Unknown Object (File)
Thu, Jun 27, 6:40 PM
Unknown Object (File)
Thu, Jun 27, 6:40 PM
Unknown Object (File)
Thu, Jun 27, 6:40 PM
Subscribers

Details

Summary

Added the activeThreadID/threadID to the thread settings loading status selector custom keys. This fixes the issue where if we update a thread avatar the loaders would be shared and shown across different threads.

Depends on D7629

Test Plan

Tested that the loader only appeared in the thread avatar I was updating:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, ashoat.
ginsu added inline comments.
native/avatars/edit-thread-avatar-provider.react.js
39 ↗(On Diff #25900)

I initially tried using an invariant to make sure the NavContext was set; however, this caused the app to crash so a work around that I felt good with is to set the activeThreadID to an empty string whenever a user is not actively in a thread. I don't think this should cause any issues with this provider, since you can only edit a thread avatar whenever you are actively in a thread, so activeThreadID should always be set in those cases.

ginsu requested review of this revision.Apr 27 2023, 4:04 PM
This revision is now accepted and ready to land.Apr 27 2023, 6:11 PM

one more rebase before landing

This revision was landed with ongoing or failed builds.Apr 28 2023, 12:44 PM
This revision was automatically updated to reflect the committed changes.