fixed topic subscription on page reload
This commit is contained in:
@@ -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
@@ -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();
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user