No refresh control when offline

This commit is contained in:
Mo Bitar
2018-08-18 10:48:52 -05:00
parent b122237d62
commit c6a121cd44
2 changed files with 2 additions and 1 deletions

View File

@@ -96,7 +96,7 @@ export default class NoteList extends Component {
maxToRenderPerBatch={6}
keyboardDismissMode={'interactive'}
keyboardShouldPersistTaps={'always'}
refreshControl={
refreshControl={!this.props.hasRefreshControl ? null :
<RefreshControl
refreshing={this.props.refreshing}
onRefresh={this.props.onRefresh}

View File

@@ -498,6 +498,7 @@ export default class Notes extends Abstract {
{notes &&
<NoteList
onRefresh={this._onRefresh.bind(this)}
hasRefreshControl={!Auth.get().offline()}
onPressItem={this._onPressItem}
refreshing={this.state.refreshing}
onSearchChange={this.onSearchTextChange}