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
F3332518: D13916.id45803.diff
Thu, Nov 21, 12:22 AM
F3331909: D13916.id45770.diff
Wed, Nov 20, 10:13 PM
F3331804: D13916.id45777.diff
Wed, Nov 20, 9:46 PM
F3329279: D13916.id45779.diff
Wed, Nov 20, 4:44 PM
F3328885: D13916.id45772.diff
Wed, Nov 20, 4:17 PM
F3328845: D13916.id45809.diff
Wed, Nov 20, 3:42 PM
F3328523: D13916.id45770.diff
Wed, Nov 20, 1:49 PM
F3327951: D13916.id45801.diff
Wed, Nov 20, 12:47 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
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()