fixed topic subscription on page reload

This commit is contained in:
or-else
2021-06-18 19:13:59 -07:00
parent 3fcd118af8
commit 2d01e0af85
5 changed files with 11 additions and 20 deletions
+4 -8
View File
@@ -268,16 +268,12 @@ class TinodeWeb extends React.Component {
// Socket error
this.handleError(err.message, 'err');
});
delete parsedNav.params.info;
delete parsedNav.params.tab;
parsedNav.path[0] = '';
HashNavigation.navigateTo(HashNavigation.composeUrlHash(parsedNav.path, parsedNav.params));
} else if (!parsedNav.params.token) {
// No token, save possible topic name and navigating to blank state.
this.setState({requestedTopic: parsedNav.path[1]});
HashNavigation.navigateTo('');
}
// Save possible topic name and navigate to blank state.
this.setState({requestedTopic: parsedNav.path[1]});
HashNavigation.navigateTo('');
this.readTimer = null;
this.readTimerCallback = null;
+4 -9
View File
@@ -5055,17 +5055,12 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
this.tinode.connect().catch(err => {
this.handleError(err.message, 'err');
});
delete parsedNav.params.info;
delete parsedNav.params.tab;
parsedNav.path[0] = '';
_lib_navigation_js__WEBPACK_IMPORTED_MODULE_16__.default.navigateTo(_lib_navigation_js__WEBPACK_IMPORTED_MODULE_16__.default.composeUrlHash(parsedNav.path, parsedNav.params));
} else if (!parsedNav.params.token) {
this.setState({
requestedTopic: parsedNav.path[1]
});
_lib_navigation_js__WEBPACK_IMPORTED_MODULE_16__.default.navigateTo('');
}
this.setState({
requestedTopic: parsedNav.path[1]
});
_lib_navigation_js__WEBPACK_IMPORTED_MODULE_16__.default.navigateTo('');
this.readTimer = null;
this.readTimerCallback = null;
this.handleHashRoute();
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long