Page MenuHomePhabricator

[lib] Fix bug in ChatThreadItemLoaderCache for simultaneous loadMostRecent calls
ClosedPublic

Authored by ashoat on Mon, Mar 24, 7:11 AM.
Tags
None
Referenced Files
F5120417: D14493.diff
Thu, Apr 3, 7:45 AM
F5118121: D14493.diff
Wed, Apr 2, 10:32 PM
Unknown Object (File)
Tue, Apr 1, 2:15 PM
Unknown Object (File)
Mon, Mar 31, 4:23 PM
Unknown Object (File)
Mon, Mar 31, 10:34 AM
Unknown Object (File)
Sun, Mar 30, 10:12 PM
Unknown Object (File)
Sun, Mar 30, 9:14 PM
Unknown Object (File)
Sat, Mar 29, 8:20 PM
Subscribers
None

Details

Summary

If loadMostRecent is called multiple times, then this.loadingState will track the most recent call. We check this.loadingState here to make sure an earlier call does not set this.currentState, but we should break regardless to make sure that the earlier call returns once all of its items are resolved.

Test Plan

I tested this along with the rest of the stack by making sure that everything still worked on my physical device with a release build, and that performance was not degraded

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable