Page MenuHomePhabricator

[lib] Update useUserProfileThreadInfo to consider thick threads
ClosedPublic

Authored by ashoat on Sep 30 2024, 9:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 11:52 AM
Unknown Object (File)
Wed, Dec 18, 11:52 AM
Unknown Object (File)
Wed, Dec 18, 11:52 AM
Unknown Object (File)
Wed, Dec 18, 11:52 AM
Unknown Object (File)
Tue, Dec 10, 5:39 PM
Unknown Object (File)
Nov 21 2024, 8:14 PM
Unknown Object (File)
Nov 19 2024, 8:54 AM
Unknown Object (File)
Nov 19 2024, 7:57 AM
Subscribers
None

Details

Summary

If a thick thread exists with the user whose profile we are viewing, we should display it.

When there are multiple, we'll select the oldest thread (by creation time). This matches behavior of pendingToRealizedThreadIDsSelector and useExistingThreadInfoFinder.

Depends on D13532

Test Plan

Tested viewing user profile on both web and native with a user with whom the viewer has a thick thread

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why do we expect to have multiple private chats, or multiple personal chats with one user? It's it impossible?

In D13533#380315, @inka wrote:

Why do we expect to have multiple private chats, or multiple personal chats with one user? It's it impossible?

It is possible to create multiple PERSONAL threads simultaneously: when a thread is created on a device that is offline, then we create a thread on another device, and then they start sending operations - there will be two PERSONAL threads on both devices.

This revision is now accepted and ready to land.Oct 1 2024, 8:35 AM