Page MenuHomePhabricator

[lib][native][web] Introduce useChildThreadInfosMap so drawer code can see ResolvedThreadInfos
ClosedPublic

Authored by ashoat on Jul 8 2024, 8:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 11, 3:31 AM
Unknown Object (File)
Fri, Oct 11, 3:31 AM
Unknown Object (File)
Fri, Oct 11, 3:31 AM
Unknown Object (File)
Fri, Oct 11, 3:31 AM
Unknown Object (File)
Sep 19 2024, 3:32 PM
Unknown Object (File)
Sep 19 2024, 10:07 AM
Unknown Object (File)
Sep 18 2024, 7:07 PM
Unknown Object (File)
Sep 8 2024, 3:03 PM
Subscribers
None

Details

Summary

This will be used in the next diff so we can sort the communities and ENS-resolved channels within them alphabetically.

I used chatMentionCandidatesObj from the ChatMentionsContext to avoid ENS-resolving all ThreadInfos twice.

Test Plan

I tested the stack as follows:

  1. I tested both native and web
  2. I tested both normal communities and GENESIS
  3. I tested both uppercase and lowercase names
  4. I made sure the list of channels was the same before and after (only the order changed)
  5. I edited a name on web and made sure its appearance in the order changed

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat requested review of this revision.Jul 8 2024, 9:15 PM
tomek added inline comments.
lib/hooks/thread-hooks.js
16

It feels wrong to use a mention-specific util in a hook that will be used outside the mentioning context.

This revision is now accepted and ready to land.Jul 9 2024, 5:15 AM
lib/hooks/thread-hooks.js
16

Yeah, this is weird. Ideally we'd rename useChatMentionContext to have a more general name, but I didn't have time to address that here