Page MenuHomePhabricator

[lib][native][web] Update useSidebarInfos to include lastUpdatedAtLeastTime
ClosedPublic

Authored by ashoat on Tue, Nov 12, 12:42 PM.
Tags
None
Referenced Files
F3239138: D13915.id45762.diff
Wed, Nov 13, 6:55 AM
F3235529: D13915.id45776.diff
Wed, Nov 13, 12:11 AM
F3234898: D13915.id45776.diff
Tue, Nov 12, 10:55 PM
F3234897: D13915.id45769.diff
Tue, Nov 12, 10:55 PM
F3234896: D13915.id45762.diff
Tue, Nov 12, 10:55 PM
F3234867: D13915.diff
Tue, Nov 12, 10:55 PM
F3234736: D13915.id.diff
Tue, Nov 12, 10:20 PM
F3234730: D13915.diff
Tue, Nov 12, 10:19 PM
Subscribers
None

Details

Summary

Before this diff, useSidebarInfos would return lastUpdatedAtLeastTime as lastUpdatedTime, as a temporary hack to help split up my work into smaller diffs.

In an earlier diff we updated lastUpdatedTime to be a Promise, and this allows us to avoid refactoring everything to handle the Promise.

In this diff, we address this temporary hack for sidebars, but for not for the ChatThreadItem itself (which will be handled later).

useSidebarInfos is used in places outside of chat-selectors.js, so this required some additional refactoring.

Depends on D13914

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:24 PM
Harbormaster failed remote builds in B32633: Diff 45769!
tomek added inline comments.
lib/hooks/search-threads.js
145–159 ↗(On Diff #45776)

Wondering whether we shouldn't just use the deep equal from lodash instead. If we have some checks for the ID change, should we protect ourselves against the change to some other fields?

This revision is now accepted and ready to land.Wed, Nov 13, 4:38 AM
lib/hooks/search-threads.js
145–159 ↗(On Diff #45776)

In this case, we are comparing the results of getAllFinalSidebarItems against getAllInitialSidebarItems for the same input. Based on the implementation of those functions, the only field that might be different is lastUpdatedTime