Merge pull request #10096 from tnt7864/unread-title-indicator

Indicate unread messages in tab title
This commit is contained in:
Florian Duros 2023-02-07 12:01:18 +01:00 committed by GitHub
commit 14e5ffbd31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();