Hook threads notification state to UI (#7298)

This commit is contained in:
Germain 2021-12-13 14:05:42 +00:00 committed by GitHub
parent 55eda7314b
commit ce570ab827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 139 additions and 28 deletions

View file

@ -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,
};
}