mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-25 00:11:43 +02:00
Create a StaticNotificationState for representative purposes
This commit is contained in:
parent
ed634a2bde
commit
c920cf784e
@ -141,6 +141,20 @@ export default class NotificationBadge extends React.PureComponent<IProps, IStat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class StaticNotificationState extends EventEmitter implements INotificationState {
|
||||||
|
constructor(public symbol: string, public count: number, public color: NotificationColor) {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static forCount(count: number, color: NotificationColor): StaticNotificationState {
|
||||||
|
return new StaticNotificationState(null, count, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static forSymbol(symbol: string, color: NotificationColor): StaticNotificationState {
|
||||||
|
return new StaticNotificationState(symbol, 0, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class RoomNotificationState extends EventEmitter implements IDestroyable, INotificationState {
|
export class RoomNotificationState extends EventEmitter implements IDestroyable, INotificationState {
|
||||||
private _symbol: string;
|
private _symbol: string;
|
||||||
private _count: number;
|
private _count: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user