Merge pull request #5254 from resynth1943/only-refresh-title-if-needed

Only set title when it changes
pull/21833/head
Michael Telatynski 2020-09-27 23:36:41 +01:00 committed by GitHub
commit 4273de31ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1855,7 +1855,12 @@ 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) {