Page MenuHomePhabricator

[lib][web] Await lastUpdatedTime and update ChatThreadItems if different
ClosedPublic

Authored by ashoat on Tue, Nov 12, 12:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 12:28 AM
Unknown Object (File)
Sat, Nov 30, 10:33 AM
Unknown Object (File)
Fri, Nov 29, 7:31 AM
Unknown Object (File)
Wed, Nov 27, 8:12 AM
Unknown Object (File)
Wed, Nov 27, 7:54 AM
Unknown Object (File)
Fri, Nov 22, 5:46 PM
Unknown Object (File)
Fri, Nov 22, 5:46 PM
Unknown Object (File)
Thu, Nov 21, 1:59 PM
Subscribers
None

Details

Summary

In D13913, I said:

For now, in this diff we're ignoring any messages whose MessageSpec.getLastUpdatedTime returns a Promise, and assuming it's the same as if it returned null. In later diffs we'll update the logic to be smarter.

In this diff we address this. When the ThreadStore changes, useFilteredChatListData now has the potential to issue two updates: the first with the "initial" value before any promises are resolved, and the second with the "final" value after resolving all promises.

Depends on D13915

Test Plan

Tested in combination with the rest of the stack. See video in D13918

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Tue, Nov 12, 1:26 PM
Harbormaster failed remote builds in B32634: Diff 45770!
tomek added inline comments.
lib/selectors/chat-selectors.js
276–288 ↗(On Diff #45777)

This can be expressed using Array.prototype.every()

This revision is now accepted and ready to land.Wed, Nov 13, 4:52 AM
lib/selectors/chat-selectors.js
276–288 ↗(On Diff #45777)

Good call!

Use Array.prototype.every()