HomePhabricator
Diffusion Comm 0943dead4c72

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

Description

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

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

Reviewers: tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D13916

Details