Commit d1e3a0e4 by HaOuiha

fix bug

parent 54d429fa
......@@ -14,7 +14,7 @@ buildscript {
maven { url "https://maven.google.com" }
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.1")
classpath('com.android.tools.build:gradle:3.5.0')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
......@@ -54,13 +54,13 @@ class SmartMeterDetailScreen extends Component {
_mcbLinksListMounted = false;
getDataInterval = null;
deviceId = this.props.navigation.getParam('deviceId');
getData = async () => {
const deviceId = this.props.navigation.getParam('deviceId');
await this.props.getCurrentSelectedData(deviceId, true);
await this.props.getCurrentSelectedData(this.deviceId, true);
await this.props.getTimers();
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(deviceId), 6000);
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(this.deviceId), 6000);
};
componentDidMount = async () => {
......@@ -110,7 +110,7 @@ class SmartMeterDetailScreen extends Component {
this.setState({ isWaiting: true });
await this.props.setMainStatus(value);
this.setState({ isWaiting: false });
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(deviceId), 6000);
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(this.deviceId), 6000);
};
componentWillUnmount = () => {
......@@ -253,7 +253,7 @@ class SmartMeterDetailScreen extends Component {
this.setState({ isWaiting: true });
await this.props.setSubBreakerStatus(value, indexMcbLinks, indexSubBreakers);
this.setState({ isWaiting: false });
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(deviceId), 6000);
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(this.deviceId), 6000);
};
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment