Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit a88b9ea

Browse files
committed
Update docs and types.
1 parent 0703ed9 commit a88b9ea

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/lifecycles/BrandingExtensions.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
11
interface AppTitleBase {
2+
/**
3+
* The configured brand name.
4+
* @example Element
5+
*/
26
brand: string;
7+
/**
8+
* Is the client sync loop in an error state.
9+
*/
310
syncError: boolean;
11+
/**
12+
* The current unread notification count.
13+
*/
14+
unreadNotificationCount?: number;
15+
/**
16+
* Has the client muted notifications.
17+
*/
18+
notificationsMuted?: boolean;
419
}
520

621
export interface AppTitleInRoom extends AppTitleBase {
7-
brand: string;
22+
/**
23+
* The room name, may be undefined if the room has no name.
24+
*/
825
roomName?: string;
26+
/**
27+
* The room ID of the room in view.
28+
*/
929
roomId: string;
10-
unreadNotificationCount: number;
11-
notificationsMuted: boolean;
1230
}
1331

1432
export type AppTitleContext = AppTitleBase | AppTitleInRoom;
1533

1634
export interface ProvideBrandingExtensions {
35+
/**
36+
* Called whenever the client would update the document title.
37+
* @param context Current application context used to generate the title.
38+
* @returns A string to be used for the full title, or null to use the default title.
39+
*/
1740
getAppTitle(context: AppTitleContext): string | null;
1841
}
1942

0 commit comments

Comments
 (0)