Page MenuHomePhabricator

[lib] Update useUserProfileThreadInfo to consider thick threads
ClosedPublic

Authored by ashoat on Mon, Sep 30, 9:42 PM.
Tags
None
Referenced Files
F2859647: D13533.id.diff
Tue, Oct 1, 2:29 PM
F2859551: D13533.diff
Tue, Oct 1, 1:47 PM
F2859339: D13533.diff
Tue, Oct 1, 1:11 PM
F2858577: D13533.id.diff
Tue, Oct 1, 11:06 AM
F2853601: D13533.id44714.diff
Mon, Sep 30, 10:28 PM
F2853535: D13533.id.diff
Mon, Sep 30, 10:27 PM
F2853487: D13533.diff
Mon, Sep 30, 10:23 PM
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.Tue, Oct 1, 8:35 AM