HomePhabricator
Diffusion Comm 3ef0178bed2b

[native] Introduce `constructThreadTraversalNodes(...)`

Tags
None
Referenced Files
F506848: c80b0d.png
Apr 25 2023, 12:28 PM
File Not Attached
Subscribers
None

Description

[native] Introduce constructThreadTraversalNodes(...)

Summary:
This function constructs an array of root ThreadTraversalNodes that will be consumed in updateRolesAndPermissions.

Note that these nodes JUST contain threadIDs and children and will be used for traversing the thread hierarchy. We will use these IDs to index into ThreadStoreThreadInfos (which is a map of threadID => rawThreadInfo). Considered different approaches, but this seemed the cleanest.

I introduced a bare bones updateRolesAndPermissions so this function isn't "dangling" and consume the bare bones updateRolesAndPermissions function in migration 38.


Depends on D7590

Test Plan:
Produces tree of ThreadTraversalNodes:

c80b0d.png (1×610 px, 95 KB)

Unit tests added later in the stack

Reviewers: ginsu, ashoat

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7600

Details

Provenance
atulAuthored on Apr 25 2023, 12:26 PM
Reviewer
ashoat
Differential Revision
D7600: [native] Introduce `constructThreadTraversalNodes(...)`
Parents
rCOMMcd669a5a35e6: [native] Introduce `updateClientDBThreadStoreThreadInfos` utility
Branches
Unknown
Tags
Unknown