Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start type checking MessageList's props. #4465

Merged
merged 16 commits into from
Jun 16, 2021
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
17748d8
MessageList: Stop accepting `typingUsers` prop from parent.
chrisbobbe Jun 16, 2021
a74cb23
MessageList: Stop accepting `fetching` prop from parent.
chrisbobbe Jun 16, 2021
134dc95
ChatScreen [nfc]: Pass messages and initialScrollMessageId to Message…
chrisbobbe Feb 3, 2021
9f9dc2d
MessageList [nfc]: Require `messages` and `initialScrollMessageId`.
chrisbobbe Feb 3, 2021
6ed1918
messagesSelectors: Add `getHtmlPieceDescriptorsForMessages`.
chrisbobbe Feb 8, 2021
d7d6d35
MessageList [nfc]: Stop using `getHtmlPieceDescriptorsForShownMessages`.
chrisbobbe Feb 8, 2021
66d16ab
SearchMessagesCard: Use memoized function to get HTML piece descriptors.
chrisbobbe Feb 8, 2021
f803542
SearchMessagesCard [nfc]: Inline `htmlPieceDescriptors`.
chrisbobbe Feb 8, 2021
13c91b6
MessageList [nfc]: Express a conditional a different way.
chrisbobbe Feb 8, 2021
f7519f2
SearchMessagesCard [nfc]: Don't pass htmlPieceDescriptorsForShownMess…
chrisbobbe Jun 16, 2021
c655202
MessageList [nfc]: Remove outer prop htmlPieceDescriptorsForShownMess…
chrisbobbe Jun 16, 2021
923f633
MessageList types: Copy `startEditMessage` to `OuterProps`, where it …
chrisbobbe Feb 3, 2021
932173a
action sheet: Add type wrapper for `connectActionSheet`.
chrisbobbe Feb 3, 2021
767fbf9
MessageList: Use our type-wrapper for `connectActionSheet`.
chrisbobbe Feb 3, 2021
ac97c91
MessageList: Fix type-checking of props.
chrisbobbe Feb 3, 2021
21fd83a
MessageList [nfc]: Spread `OuterProps` in `Props`, to remove repeated…
chrisbobbe Jun 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SearchMessagesCard [nfc]: Inline htmlPieceDescriptors.
  • Loading branch information
chrisbobbe committed Jun 16, 2021
commit f803542910de5e4bb0f1294bb35a7ed4aed8f31c
10 changes: 7 additions & 3 deletions src/search/SearchMessagesCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ export default class SearchMessagesCard extends PureComponent<Props> {
return <SearchEmptyState text="No results" />;
}

const htmlPieceDescriptors = getHtmlPieceDescriptorsForMessages(messages, HOME_NARROW);
// TODO: This is kind of a hack.
const narrow = HOME_NARROW;

return (
<View style={styles.results}>
<MessageList
initialScrollMessageId={messages[0].id}
messages={messages}
narrow={HOME_NARROW}
htmlPieceDescriptorsForShownMessages={htmlPieceDescriptors}
narrow={narrow}
htmlPieceDescriptorsForShownMessages={getHtmlPieceDescriptorsForMessages(
messages,
narrow,
)}
showMessagePlaceholders={false}
/>
</View>
Expand Down