Fixes a bug where searching in the community directory would crash due to FlatList receiving an array of ThreadInfo instead of the expected { threadInfo, farcasterChannelID } shape. We now create a Map from threadInfo.id to farcasterChannelID in the useCallback and use it to reconstruct the correct shape for search results. Also updated renderItem typing to align with Flow and React Native’s expectations.
Details
Details
- Reviewers
ashoat - Commits
- rCOMMaf61a300a3f5: [native] fix search in community directory
- Launched the app and opened the community joiner modal
- Verified that the full community list renders without crashing
- Typed into the search bar and confirmed that search results display correctly and the app no longer crashes
- Confirmed that the correct Farcaster avatars still appear in both full and filtered lists
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| native/components/community-list.react.js | ||
|---|---|---|
| 6 ↗ | (On Diff #48026) | Can we replace this with a typehint at the listData declaration as you suggested over chat? |