This commit is contained in:
or-else
2021-11-30 18:13:48 -08:00
parent c7a60b9608
commit 6a877620e6
16 changed files with 105 additions and 71 deletions
+11 -3
View File
@@ -288,9 +288,12 @@ class TinodeWeb extends React.Component {
});
}
// Save possible topic name and navigate to blank state.
this.setState({requestedTopic: parsedNav.path[1]});
HashNavigation.navigateTo('');
// Maybe navigate to home screen.
if (!['cred', 'reset', 'register'].includes(parsedNav.path[0])) {
// Save possible topic name.
this.setState({requestedTopic: parsedNav.path[1]});
HashNavigation.navigateTo('');
}
this.readTimer = null;
this.readTimerCallback = null;
@@ -1199,6 +1202,8 @@ class TinodeWeb extends React.Component {
delete parsed.params.code;
delete parsed.params.method;
delete parsed.params.tab;
delete parsed.params.scheme;
delete parsed.params.token;
}
HashNavigation.navigateTo(HashNavigation.composeUrlHash(parsed.path, parsed.params));
this.setState({errorText: '', errorLevel: null});
@@ -1611,6 +1616,9 @@ class TinodeWeb extends React.Component {
.then(() => {
return this.tinode.updateAccountBasic(null, null, newPassword, {token: token});
})
.then(() => {
HashNavigation.navigateTo('');
})
.catch((err) => {
// Socket error
this.handleError(err.message, 'err');