forked from Ivasoft/mattermost-mobile
Last item in search results displays with no buffer below (#794)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user