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
F3378163: D12700.diff
Wed, Nov 27, 9:30 AM
Unknown Object (File)
Mon, Nov 25, 11:01 AM
Unknown Object (File)
Mon, Nov 11, 10:28 PM
Unknown Object (File)
Mon, Nov 11, 9:31 PM
Unknown Object (File)
Mon, Nov 11, 7:50 PM
Unknown Object (File)
Mon, Nov 11, 8:12 AM
Unknown Object (File)
Oct 11 2024, 3:31 AM
Unknown Object (File)
Oct 11 2024, 3:31 AM
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