Page MenuHomePhabricator

[lib] Fix incorrect timestamps for sidebars
ClosedPublic

Authored by ashoat on Nov 20 2024, 9:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 12:44 PM
Unknown Object (File)
Sun, Dec 15, 12:13 PM
Unknown Object (File)
Wed, Dec 11, 3:41 PM
Unknown Object (File)
Sat, Dec 7, 1:42 PM
Unknown Object (File)
Wed, Dec 4, 3:36 PM
Unknown Object (File)
Tue, Dec 3, 9:31 AM
Unknown Object (File)
Sat, Nov 30, 6:35 PM
Unknown Object (File)
Sat, Nov 30, 7:51 AM
Subscribers

Details

Summary

This addresses ENG-9951:

  1. Fixes useSidebarInfos's initial ordering to sort on lastUpdatedAtLeastTime (a number) instead of lastUpdatedTime (a promise). Flow failed to catch this because Lodash's usage is hard to type.
  2. Fixes lastUpdatedTimeIncludingSidebars to consider all sidebars, instead of trusting the first one in the initial order to have the most recent timestamp.
  3. Fixes getAllFinalSidebarItems to reorder after all promises resolve.
Test Plan

Tested on both native (my iOS device running a Release build pointed at prod) and web (my comm.software staging environment that uses prod data)

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/fix
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat published this revision for review.Nov 20 2024, 9:08 AM
This revision is now accepted and ready to land.Nov 20 2024, 3:36 PM

Changes in initial version broke useSearchSidebars comparison algo. Moved the sorting to getSidebarItems instead, which isn't used in useSearchSidebars and is only used in chat-selectors.js

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