mirror of https://github.com/vector-im/riot-web
Only set title when it changes
I've seen Chromium constantly refresh the title in the developer tools. To be honest, I'm not sure if this means Chromium wastes CPU time changing a title, but this may introduce better performance. Signed-off-by: Resynth <resynth1943@tutanota.com>pull/21833/head
parent
8ec7e7c714
commit
747f9fba38
|
@ -1843,7 +1843,11 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
} else {
|
||||
subtitle = `${this.subTitleStatus} ${subtitle}`;
|
||||
}
|
||||
document.title = `${SdkConfig.get().brand} ${subtitle}`;
|
||||
const title = `${SdkConfig.get().brand} ${subtitle}`;
|
||||
|
||||
if (document.title !== title) {
|
||||
document.title = title;
|
||||
}
|
||||
}
|
||||
|
||||
updateStatusIndicator(state: string, prevState: string) {
|
||||
|
|
Loading…
Reference in New Issue