Hook threads notification state to UI (#7298)
This commit is contained in:
parent
55eda7314b
commit
ce570ab827
6 changed files with 139 additions and 28 deletions
|
@ -30,6 +30,7 @@ import {
|
|||
} from '../../../dispatcher/payloads/SetRightPanelPhasePayload';
|
||||
import type { EventSubscription } from "fbemitter";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { NotificationColor } from '../../../stores/notifications/NotificationColor';
|
||||
|
||||
export enum HeaderKind {
|
||||
Room = "room",
|
||||
|
@ -39,6 +40,7 @@ export enum HeaderKind {
|
|||
interface IState {
|
||||
headerKind: HeaderKind;
|
||||
phase: RightPanelPhases;
|
||||
threadNotificationColor: NotificationColor;
|
||||
}
|
||||
|
||||
interface IProps {}
|
||||
|
@ -54,6 +56,7 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
const rps = RightPanelStore.getSharedInstance();
|
||||
this.state = {
|
||||
headerKind: kind,
|
||||
threadNotificationColor: NotificationColor.None,
|
||||
phase: kind === HeaderKind.Room ? rps.visibleRoomPanelPhase : rps.visibleGroupPanelPhase,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue