Last item in search results displays with no buffer below (#794)
This commit is contained in:
parent
64f036982e
commit
8e0d1f56d9
1 changed files with 8 additions and 2 deletions
|
|
@ -223,7 +223,7 @@ class Search extends Component {
|
|||
actions.removeSearchTerms(currentTeamId, item.terms);
|
||||
};
|
||||
|
||||
renderPost = ({item}) => {
|
||||
renderPost = ({item, index}) => {
|
||||
if (item.id === SEARCHING) {
|
||||
return (
|
||||
<View style={{width: '100%', height: '100%'}}>
|
||||
|
|
@ -232,7 +232,7 @@ class Search extends Component {
|
|||
);
|
||||
}
|
||||
|
||||
const {channels, theme} = this.props;
|
||||
const {channels, posts, theme} = this.props;
|
||||
const style = getStyleFromTheme(theme);
|
||||
|
||||
const channel = channels.find((c) => c.id === item.channel_id);
|
||||
|
|
@ -242,6 +242,11 @@ class Search extends Component {
|
|||
displayName = channel.display_name;
|
||||
}
|
||||
|
||||
let separator;
|
||||
if (index === posts.length - 1) {
|
||||
separator = this.renderPostSeparator();
|
||||
}
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text style={style.channelName}>
|
||||
|
|
@ -259,6 +264,7 @@ class Search extends Component {
|
|||
shouldRenderReplyButton={true}
|
||||
navigator={this.props.navigator}
|
||||
/>
|
||||
{separator}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue