Indicate unread rooms in document.title

Signed-off-by: Tim Tills <tnt7864@rit.edu>
pull/28788/head^2
Tim Tills 2023-02-05 21:31:16 -05:00
parent a756b33fe9
commit 73c2f42177
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,7 @@ import GenericToast from "../views/toasts/GenericToast";
import RovingSpotlightDialog, { Filter } from "../views/dialogs/spotlight/SpotlightDialog";
import { findDMForUser } from "../../utils/dm/findDMForUser";
import { Linkify } from "../../HtmlUtils";
import { NotificationColor } from "../../stores/notifications/NotificationColor";
// legacy export
export { default as Views } from "../../Views";
@ -1961,6 +1962,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
if (numUnreadRooms > 0) {
this.subTitleStatus += `[${numUnreadRooms}]`;
} else if (notificationState.color >= NotificationColor.Bold) {
this.subTitleStatus += `*`;
}
this.setPageSubtitle();