Fix React contexts (#12855)
This commit is contained in:
parent
9b77279b3e
commit
b6addb4118
35 changed files with 99 additions and 107 deletions
|
@ -77,6 +77,7 @@ interface IState {
|
|||
|
||||
export default class TimelineCard extends React.Component<IProps, IState> {
|
||||
public static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
private dispatcherRef?: string;
|
||||
private layoutWatcherRef?: string;
|
||||
|
@ -84,8 +85,8 @@ export default class TimelineCard extends React.Component<IProps, IState> {
|
|||
private card = React.createRef<HTMLDivElement>();
|
||||
private readReceiptsSettingWatcher: string | undefined;
|
||||
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
public constructor(props: IProps, context: React.ContextType<typeof RoomContext>) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
showReadReceipts: SettingsStore.getValue("showReadReceipts", props.room.roomId),
|
||||
layout: SettingsStore.getValue("layout"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue