Merge pull request #4835 from matrix-org/t3chguy/notifications0
More small tweaks in preparation for Notifications rework
This commit is contained in:
commit
85c5bb3bc3
4 changed files with 139 additions and 15 deletions
|
@ -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 {
|
||||
private _symbol: string;
|
||||
private _count: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue