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
Unknown Object (File)
Sat, Dec 14, 5:32 PM
Unknown Object (File)
Sat, Dec 14, 5:32 PM
Unknown Object (File)
Sat, Dec 14, 5:32 PM
Unknown Object (File)
Sat, Dec 14, 5:32 PM
Unknown Object (File)
Sat, Dec 14, 5:32 PM
Unknown Object (File)
Sat, Dec 14, 5:25 PM
Unknown Object (File)
Nov 25 2024, 8:54 PM
Unknown Object (File)
Nov 25 2024, 8:54 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
No Lint Coverage
Unit
No Test Coverage

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.