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
F3349344: D13916.id45801.diff
Fri, Nov 22, 5:46 PM
F3349339: D13916.id45809.diff
Fri, Nov 22, 5:46 PM
Unknown Object (File)
Thu, Nov 21, 1:59 PM
Unknown Object (File)
Thu, Nov 21, 7:58 AM
Unknown Object (File)
Thu, Nov 21, 7:35 AM
Unknown Object (File)
Thu, Nov 21, 7:23 AM
Unknown Object (File)
Thu, Nov 21, 2:25 AM
Unknown Object (File)
Thu, Nov 21, 12:22 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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()