You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-19 20:23:18 +03:00
Merge pull request #1127 from matrix-org/t3chguy/reset_favicon_on_logout
reset page subtitle and favicon on_logged_out
This commit is contained in:
@ -999,6 +999,7 @@ module.exports = React.createClass({
|
||||
page_type: PageTypes.RoomDirectory,
|
||||
});
|
||||
this._teamToken = null;
|
||||
this._setPageSubtitle();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1323,6 +1324,10 @@ module.exports = React.createClass({
|
||||
});
|
||||
},
|
||||
|
||||
_setPageSubtitle: function(subtitle='') {
|
||||
document.title = `Riot ${subtitle}`;
|
||||
},
|
||||
|
||||
updateStatusIndicator: function(state, prevState) {
|
||||
let notifCount = 0;
|
||||
|
||||
@ -1343,15 +1348,15 @@ module.exports = React.createClass({
|
||||
PlatformPeg.get().setNotificationCount(notifCount);
|
||||
}
|
||||
|
||||
let title = "Riot ";
|
||||
let subtitle = '';
|
||||
if (state === "ERROR") {
|
||||
title += `[${_t("Offline")}] `;
|
||||
subtitle += `[${_t("Offline")}] `;
|
||||
}
|
||||
if (notifCount > 0) {
|
||||
title += `[${notifCount}]`;
|
||||
subtitle += `[${notifCount}]`;
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
this._setPageSubtitle(subtitle);
|
||||
},
|
||||
|
||||
onUserSettingsClose: function() {
|
||||
|
Reference in New Issue
Block a user