From 40112640740f486816c2452877229b05062ee8fd Mon Sep 17 00:00:00 2001 From: Daniel Sastre Date: Thu, 9 Jun 2016 17:28:38 +0200 Subject: [PATCH] Don't hide the last comment in iOS --- app/MnmComments.js | 105 ++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/app/MnmComments.js b/app/MnmComments.js index e78f74b..92bffc2 100644 --- a/app/MnmComments.js +++ b/app/MnmComments.js @@ -21,15 +21,15 @@ var Icon = require('react-native-vector-icons/EvilIcons'); class MnmComments extends Component { constructor(props) { - super(props); - var dataSource = new ListView.DataSource({ - rowHasChanged: (r1, r2) => r1.id !== r2.id - }); - this.state = { - dataSource: dataSource.cloneWithRows([]), - rows: [] - }; - this._getComments(); + super(props); + var dataSource = new ListView.DataSource({ + rowHasChanged: (r1, r2) => r1.id !== r2.id + }); + this.state = { + dataSource: dataSource.cloneWithRows([]), + rows: [] + }; + this._getComments(); } _getComments() { @@ -57,51 +57,56 @@ class MnmComments extends Component { } renderRow(rowData) { - return ( - - - {rowData.user} - - {rowData.votes} - - {rowData.karma} - {rowData.fromNow} - - - #{rowData.order} - - - - - - ); + return ( + + + {rowData.user} + + {rowData.votes} + + {rowData.karma} + {rowData.fromNow} + + + #{rowData.order} + + + + + + ); } - _renderList() { - if (this.state.rows.length > 0) { - return ; - } else { - return ; - } + _renderList() { + if (this.state.rows.length > 0) { + return ( + + ) + } else { + return ( + + ) } + } - render() { - return ( - - {this._renderList()} - - ); - } + render() { + return ( + + {this._renderList()} + + ); + } } var styles = StyleSheet.create({