[lib] Default to first read chat thread in chatListData
Summary:
This diff updates mostRecentReadThread, which is only used on web. We use it to determine what thread to show by default.
With the implementation of sidebars, one confusing thing was that mostRecentReadThread could return a sidebar. But if we excluded sidebars, it might select the second top-level thread instead of the first, if the most recent (non-sidebar) message in the second thread was newer than the in the first, but the first had a sidebar with a newer message.
This diff makes sure that mostRecentReadThread always returns the first thread by chatListData.
Test Plan: Load the /chat/ route under a variety of conditions, including the complex one I mentioned above, and make sure the very first top-level thread in chatListData is always the default
Reviewers: KatPo, palys-swm
Reviewed By: KatPo, palys-swm
Subscribers: zrebcu411, Adrian
Differential Revision: https://phabricator.ashoat.com/D465