Skip to content
Snippets Groups Projects
Commit 94a16aec authored by Martin Santangelo's avatar Martin Santangelo
Browse files

(fix) remove deprecated componentWillMount in discovery

parent 22311a3e
No related branches found
No related tags found
2 merge requests!436Release 3.12.0,!377Udpate app to react native 0.61.4 and jitsi 2.4.0
......@@ -86,10 +86,26 @@ export default class DiscoveryScreen extends Component {
}
}
/**
* constructor
*/
constructor(props) {
super(props);
this.props.discovery.init();
const params = this.props.navigation.state.params;
if (params && params.type) {
this.props.discovery.filters.setType(params.type);
}
this.tileError = i18n.t('error');
}
/**
* On component will mount
*/
componentWillMount() {
componentDidMount() {
// load data on enter
this.disposeEnter = this.props.navigation.addListener('didFocus', (s) => {
setTimeout(() => {
......@@ -103,15 +119,6 @@ export default class DiscoveryScreen extends Component {
this.setState({active: false});
}, 50);
});
this.props.discovery.init();
const params = this.props.navigation.state.params;
if (params && params.type) {
this.props.discovery.filters.setType(params.type);
}
this.tileError = i18n.t('error');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment