Page MenuHomePhabricator

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

Authored by ashoat on Nov 12 2024, 12:43 PM.
Tags
None
Referenced Files
F3515351: D13916.id46294.diff
Sun, Dec 22, 8:35 AM
Unknown Object (File)
Wed, Dec 18, 4:41 PM
Unknown Object (File)
Wed, Dec 18, 4:41 PM
Unknown Object (File)
Wed, Dec 18, 4:41 PM
Unknown Object (File)
Wed, Dec 18, 4:41 PM
Unknown Object (File)
Wed, Dec 18, 4:41 PM
Unknown Object (File)
Wed, Dec 18, 4:13 PM
Unknown Object (File)
Wed, Dec 18, 4:13 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.Nov 12 2024, 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.Nov 13 2024, 4:52 AM
lib/selectors/chat-selectors.js
276–288 ↗(On Diff #45777)

Good call!

Use Array.prototype.every()

This revision is now accepted and ready to land.Tue, Dec 10, 8:25 AM