Commit 34666832 by HaOuiha

.

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