Commit 34666832 by HaOuiha

.

parent d1e3a0e4
......@@ -55,3 +55,5 @@ buck-out/
# Bundle artifact
*.jsbundle
*android/app/release
\ No newline at end of file
......@@ -44,12 +44,12 @@ class CameraScreen extends Component {
this.setState({ isWaiting: true });
}, 250);
/*--------------------------------------------------------------------*/
this.createNewDevice('7cb6e9aa-0a44-47d6-bca8-4d724b0fcd43');
// this.createNewDevice('7cb6e9aa-0a44-47d6-bca8-4d724b0fcd43');
};
componentDidUpdate = (prevProps, prevState) => {
if (this.props.isFocused !== prevProps.isFocused) {
this.props.getAllMainDeviceInfo();
this.state.scanned && this.props.getAllMainDeviceInfo();
}
};
......
......@@ -61,7 +61,7 @@ export default class ChangePasswordScreen extends React.Component {
logout = async () => {
this.setState({ changeSuccessModal: false });
this.props.navigation.navigate('Login');
await AsyncStorage.clear();
await AsyncStorage.removeItem('RememberedLogin');
};
render() {
......
......@@ -85,6 +85,10 @@ class SmartMeterDetailScreen extends Component {
this.setSubBreakersState();
}
if (prevProps.isFocused !== this.props.isFocused) {
if (this.props.isFocused === true) {
clearInterval(this.getDataInterval);
this.getDataInterval = setInterval(() => this.props.getCurrentSelectedData(this.deviceId), 6000);
}
// when not focud this page
if (this.props.isFocused === false) {
this._mcbLinksListMounted = false;
......
......@@ -56,16 +56,16 @@ class RegisterScreen extends Component {
}
};
sendEmail = async () => {
const user = app.auth().currentUser;
try {
await user.sendEmailVerification().then(() => {
app.auth().signOut();
});
} catch (error) {
alert(error);
}
};
// sendEmail = async () => {
// const user = app.auth().currentUser;
// try {
// await user.sendEmailVerification().then(() => {
// app.auth().signOut();
// });
// } catch (error) {
// alert(error);
// }
// };
render() {
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