You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
reset page subtitle on_logged_out
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@ -968,6 +968,7 @@ module.exports = React.createClass({
|
|||||||
* Called when the session is logged out
|
* Called when the session is logged out
|
||||||
*/
|
*/
|
||||||
_onLoggedOut: function() {
|
_onLoggedOut: function() {
|
||||||
|
this._setPageSubtitle();
|
||||||
this.notifyNewScreen('login');
|
this.notifyNewScreen('login');
|
||||||
this.setStateForNewScreen({
|
this.setStateForNewScreen({
|
||||||
loggedIn: false,
|
loggedIn: false,
|
||||||
@ -1267,6 +1268,10 @@ module.exports = React.createClass({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_setPageSubtitle: function(subtitle='') {
|
||||||
|
document.title = `Riot ${subtitle}`;
|
||||||
|
},
|
||||||
|
|
||||||
updateStatusIndicator: function(state, prevState) {
|
updateStatusIndicator: function(state, prevState) {
|
||||||
let notifCount = 0;
|
let notifCount = 0;
|
||||||
|
|
||||||
@ -1287,15 +1292,15 @@ module.exports = React.createClass({
|
|||||||
PlatformPeg.get().setNotificationCount(notifCount);
|
PlatformPeg.get().setNotificationCount(notifCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
let title = "Riot ";
|
let subtitle = '';
|
||||||
if (state === "ERROR") {
|
if (state === "ERROR") {
|
||||||
title += `[${_t("Offline")}] `;
|
subtitle += `[${_t("Offline")}] `;
|
||||||
}
|
}
|
||||||
if (notifCount > 0) {
|
if (notifCount > 0) {
|
||||||
title += `[${notifCount}]`;
|
subtitle += `[${notifCount}]`;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = title;
|
this._setPageSubtitle(subtitle);
|
||||||
},
|
},
|
||||||
|
|
||||||
onUserSettingsClose: function() {
|
onUserSettingsClose: function() {
|
||||||
|
Reference in New Issue
Block a user