Fix React class constructor signature to not pass context
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
983db465c3
commit
62c765bfd3
41 changed files with 89 additions and 90 deletions
|
@ -374,16 +374,16 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
public static contextType = SDKContext;
|
||||
declare public context: React.ContextType<typeof SDKContext>;
|
||||
|
||||
public constructor(props: IRoomProps, context: React.ContextType<typeof SDKContext>) {
|
||||
super(props, context);
|
||||
public constructor(props: IRoomProps) {
|
||||
super(props);
|
||||
|
||||
this.askToJoinEnabled = SettingsStore.getValue("feature_ask_to_join");
|
||||
|
||||
if (!context.client) {
|
||||
if (!this.context.client) {
|
||||
throw new Error("Unable to create RoomView without MatrixClient");
|
||||
}
|
||||
|
||||
const llMembers = context.client.hasLazyLoadMembersEnabled();
|
||||
const llMembers = this.context.client.hasLazyLoadMembersEnabled();
|
||||
this.state = {
|
||||
roomId: undefined,
|
||||
roomLoading: true,
|
||||
|
@ -417,7 +417,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
showJoinLeaves: true,
|
||||
showAvatarChanges: true,
|
||||
showDisplaynameChanges: true,
|
||||
matrixClientIsReady: context.client?.isInitialSyncComplete(),
|
||||
matrixClientIsReady: this.context.client?.isInitialSyncComplete(),
|
||||
mainSplitContentType: MainSplitContentType.Timeline,
|
||||
timelineRenderingType: TimelineRenderingType.Room,
|
||||
liveTimeline: undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue