diff --git a/src/components/structures/EmbeddedPage.tsx b/src/components/structures/EmbeddedPage.tsx index c471565d91..6773c44de4 100644 --- a/src/components/structures/EmbeddedPage.tsx +++ b/src/components/structures/EmbeddedPage.tsx @@ -40,8 +40,8 @@ export default class EmbeddedPage extends React.PureComponent { private unmounted = false; private dispatcherRef?: string; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { page: "", diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 4b9b88a4ae..540f1f48d0 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -252,8 +252,8 @@ export default class MessagePanel extends React.Component { // A map to allow groupers to maintain consistent keys even if their first event is uprooted due to back-pagination. public grouperKeyMap = new WeakMap(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { // previous positions the read marker has been in, so we can diff --git a/src/components/structures/NotificationPanel.tsx b/src/components/structures/NotificationPanel.tsx index 3e612ab993..a2d6042a99 100644 --- a/src/components/structures/NotificationPanel.tsx +++ b/src/components/structures/NotificationPanel.tsx @@ -38,8 +38,8 @@ export default class NotificationPanel extends React.PureComponent(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { narrow: false, diff --git a/src/components/structures/RightPanel.tsx b/src/components/structures/RightPanel.tsx index a1f2016243..d9e1ad3c5c 100644 --- a/src/components/structures/RightPanel.tsx +++ b/src/components/structures/RightPanel.tsx @@ -65,8 +65,8 @@ export default class RightPanel extends React.Component { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: Props, context: React.ContextType) { - super(props, context); + public constructor(props: Props) { + super(props); this.state = { searchQuery: "", diff --git a/src/components/structures/RoomStatusBar.tsx b/src/components/structures/RoomStatusBar.tsx index 9120367042..7a032cfc33 100644 --- a/src/components/structures/RoomStatusBar.tsx +++ b/src/components/structures/RoomStatusBar.tsx @@ -91,8 +91,8 @@ export default class RoomStatusBar extends React.PureComponent { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { syncState: this.context.getSyncState(), diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 30f425dc55..0a904f73d6 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -374,16 +374,16 @@ export class RoomView extends React.Component { public static contextType = SDKContext; declare public context: React.ContextType; - public constructor(props: IRoomProps, context: React.ContextType) { - 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 { showJoinLeaves: true, showAvatarChanges: true, showDisplaynameChanges: true, - matrixClientIsReady: context.client?.isInitialSyncComplete(), + matrixClientIsReady: this.context.client?.isInitialSyncComplete(), mainSplitContentType: MainSplitContentType.Timeline, timelineRenderingType: TimelineRenderingType.Room, liveTimeline: undefined, diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 8046d95749..cca8e02559 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -601,13 +601,13 @@ export default class SpaceRoomView extends React.PureComponent { private dispatcherRef?: string; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); let phase = Phase.Landing; const creator = this.props.space.currentState.getStateEvents(EventType.RoomCreate, "")?.getSender(); - const showSetup = this.props.justCreatedOpts && context.getSafeUserId() === creator; + const showSetup = this.props.justCreatedOpts && this.context.getSafeUserId() === creator; if (showSetup) { phase = diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index e2cecf3ebf..de2471e5ce 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -86,8 +86,8 @@ export default class ThreadView extends React.Component { // Set by setEventId in ctor. private eventId!: string; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.setEventId(this.props.mxEvent); const thread = this.props.room.getThread(this.eventId) ?? undefined; diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index a28089c989..18f7c77908 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -259,8 +259,8 @@ class TimelinePanel extends React.Component { private callEventGroupers = new Map(); private initialReadMarkerId: string | null = null; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); debuglog("mounting"); diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index f5bde3e676..4d940ab495 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -83,8 +83,8 @@ export default class UserMenu extends React.Component { private readonly dndWatcherRef?: string; private buttonRef: React.RefObject = createRef(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { contextMenuPosition: null, diff --git a/src/components/structures/UserView.tsx b/src/components/structures/UserView.tsx index ba905099ba..205ab3dd49 100644 --- a/src/components/structures/UserView.tsx +++ b/src/components/structures/UserView.tsx @@ -34,8 +34,8 @@ export default class UserView extends React.Component { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { loading: true, }; diff --git a/src/components/structures/auth/SoftLogout.tsx b/src/components/structures/auth/SoftLogout.tsx index 7f0cbc5d49..00fb03feb0 100644 --- a/src/components/structures/auth/SoftLogout.tsx +++ b/src/components/structures/auth/SoftLogout.tsx @@ -66,8 +66,8 @@ export default class SoftLogout extends React.Component { public static contextType = SDKContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { loginView: LoginView.Loading, diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 773285bdf4..224b280f74 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -130,8 +130,8 @@ export default class MessageContextMenu extends React.Component private reactButtonRef = createRef(); // XXX Ref to a functional component - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { canRedact: false, diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 6db9e7d385..907ce996a7 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -145,8 +145,8 @@ export default class AppTile extends React.Component { private dispatcherRef?: string; private unmounted = false; - public constructor(props: IProps, context: ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); // The key used for PersistedElement this.persistKey = getPersistKey(WidgetUtils.getWidgetUid(this.props.app)); diff --git a/src/components/views/elements/PersistentApp.tsx b/src/components/views/elements/PersistentApp.tsx index 13f1c5294a..ae1feb764c 100644 --- a/src/components/views/elements/PersistentApp.tsx +++ b/src/components/views/elements/PersistentApp.tsx @@ -28,9 +28,9 @@ export default class PersistentApp extends React.Component { declare public context: ContextType; private room: Room; - public constructor(props: IProps, context: ContextType) { - super(props, context); - this.room = context.getRoom(this.props.persistentRoomId)!; + public constructor(props: IProps) { + super(props); + this.room = this.context.getRoom(this.props.persistentRoomId)!; } public render(): JSX.Element | null { diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index 14cd8a655a..ee92b2f37a 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -71,8 +71,8 @@ export default class ReplyChain extends React.Component { private room: Room; private blockquoteRef = React.createRef(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { events: [], diff --git a/src/components/views/elements/RoomAliasField.tsx b/src/components/views/elements/RoomAliasField.tsx index 751a7e1d62..3feac450e7 100644 --- a/src/components/views/elements/RoomAliasField.tsx +++ b/src/components/views/elements/RoomAliasField.tsx @@ -37,8 +37,8 @@ export default class RoomAliasField extends React.PureComponent private fieldRef = createRef(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { isValid: true, diff --git a/src/components/views/emojipicker/ReactionPicker.tsx b/src/components/views/emojipicker/ReactionPicker.tsx index bd16634490..9f1fa4ebd4 100644 --- a/src/components/views/emojipicker/ReactionPicker.tsx +++ b/src/components/views/emojipicker/ReactionPicker.tsx @@ -31,8 +31,8 @@ class ReactionPicker extends React.Component { public static contextType = RoomContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { selectedEmojis: new Set(Object.keys(this.getReactions())), diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index e812f1c6bd..c41444a570 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -47,8 +47,8 @@ class LocationPicker extends React.Component { private geolocate?: maplibregl.GeolocateControl; private marker?: maplibregl.Marker; - public constructor(props: ILocationPickerProps, context: React.ContextType) { - super(props, context); + public constructor(props: ILocationPickerProps) { + super(props); this.state = { position: undefined, diff --git a/src/components/views/messages/EditHistoryMessage.tsx b/src/components/views/messages/EditHistoryMessage.tsx index b20beaaf95..da077b31b4 100644 --- a/src/components/views/messages/EditHistoryMessage.tsx +++ b/src/components/views/messages/EditHistoryMessage.tsx @@ -51,8 +51,8 @@ export default class EditHistoryMessage extends React.PureComponent) { - super(props, context); + public constructor(props: IProps) { + super(props); const cli = this.context; const userId = cli.getSafeUserId(); diff --git a/src/components/views/messages/MLocationBody.tsx b/src/components/views/messages/MLocationBody.tsx index 7735e64b03..14b55c034d 100644 --- a/src/components/views/messages/MLocationBody.tsx +++ b/src/components/views/messages/MLocationBody.tsx @@ -36,8 +36,8 @@ export default class MLocationBody extends React.Component { private mapId: string; private reconnectedListener: ClientEventHandlerMap[ClientEvent.Sync]; - public constructor(props: IBodyProps, context: React.ContextType) { - super(props, context); + public constructor(props: IBodyProps) { + super(props); // multiple instances of same map might be in document // eg thread and main timeline, reply diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx index ba3962779f..6dd65e1e04 100644 --- a/src/components/views/messages/MPollBody.tsx +++ b/src/components/views/messages/MPollBody.tsx @@ -142,8 +142,8 @@ export default class MPollBody extends React.Component { declare public context: React.ContextType; private seenEventIds: string[] = []; // Events we have already seen - public constructor(props: IBodyProps, context: React.ContextType) { - super(props, context); + public constructor(props: IBodyProps) { + super(props); this.state = { selected: null, diff --git a/src/components/views/messages/ReactionsRow.tsx b/src/components/views/messages/ReactionsRow.tsx index 97cb20ff4d..82e5d74ff9 100644 --- a/src/components/views/messages/ReactionsRow.tsx +++ b/src/components/views/messages/ReactionsRow.tsx @@ -77,8 +77,8 @@ export default class ReactionsRow extends React.PureComponent { public static contextType = RoomContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { myReactions: this.getMyReactions(), diff --git a/src/components/views/right_panel/TimelineCard.tsx b/src/components/views/right_panel/TimelineCard.tsx index f62319f3cd..aec5245cdd 100644 --- a/src/components/views/right_panel/TimelineCard.tsx +++ b/src/components/views/right_panel/TimelineCard.tsx @@ -77,8 +77,8 @@ export default class TimelineCard extends React.Component { private card = React.createRef(); private readReceiptsSettingWatcher: string | undefined; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { showReadReceipts: SettingsStore.getValue("showReadReceipts", props.room.roomId), layout: SettingsStore.getValue("layout"), diff --git a/src/components/views/room_settings/AliasSettings.tsx b/src/components/views/room_settings/AliasSettings.tsx index 8d957bffc2..6392b21eb5 100644 --- a/src/components/views/room_settings/AliasSettings.tsx +++ b/src/components/views/room_settings/AliasSettings.tsx @@ -101,8 +101,8 @@ export default class AliasSettings extends React.Component { canSetCanonicalAlias: false, }; - public constructor(props: IProps, context: ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); const state: IState = { altAliases: [], diff --git a/src/components/views/rooms/Autocomplete.tsx b/src/components/views/rooms/Autocomplete.tsx index 461175c85c..871c065ebc 100644 --- a/src/components/views/rooms/Autocomplete.tsx +++ b/src/components/views/rooms/Autocomplete.tsx @@ -51,8 +51,8 @@ export default class Autocomplete extends React.PureComponent { public static contextType = RoomContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { // list of completionResults, each containing completions diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index f4b5c3698e..d7712e6afd 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -99,8 +99,8 @@ class EditMessageComposer extends React.Component) { - super(props, context); + public constructor(props: IEditMessageComposerProps) { + super(props); const isRestored = this.createEditorModel(); const ev = this.props.editState.getEvent(); diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 8c755f00bd..78812c8f26 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -300,8 +300,8 @@ export class UnwrappedEventTile extends React.Component private unmounted = false; - public constructor(props: EventTileProps, context: React.ContextType) { - super(props, context); + public constructor(props: EventTileProps) { + super(props); const thread = this.thread; diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index a9250c81ab..6ec40a76f5 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -78,10 +78,10 @@ export default class MemberList extends React.Component { declare public context: React.ContextType; private tiles: Map = new Map(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = this.getMembersState([], []); - this.showPresence = context?.memberListStore.isPresenceEnabled() ?? true; + this.showPresence = this.context?.memberListStore.isPresenceEnabled() ?? true; } private listenForMembersChanges(): void { diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index 18549ef7d3..44581686a8 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -124,9 +124,8 @@ export class MessageComposer extends React.Component { isRichTextEnabled: true, }; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); - this.context = context; // otherwise React will only set it prior to render due to type def above + public constructor(props: IProps) { + super(props); const isWysiwygLabEnabled = SettingsStore.getValue("feature_wysiwyg_composer"); let isRichTextEnabled = true; diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index 86148efb95..c842edb119 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -426,8 +426,8 @@ export default class RoomList extends React.PureComponent { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { sublists: {}, diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.tsx b/src/components/views/rooms/RoomUpgradeWarningBar.tsx index e92be96cb2..5e7d1e372a 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.tsx +++ b/src/components/views/rooms/RoomUpgradeWarningBar.tsx @@ -27,8 +27,8 @@ export default class RoomUpgradeWarningBar extends React.PureComponent; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); const tombstone = this.props.room.currentState.getStateEvents("m.room.tombstone", ""); this.state = { diff --git a/src/components/views/rooms/SearchResultTile.tsx b/src/components/views/rooms/SearchResultTile.tsx index 94f5e6da9d..a885fbf859 100644 --- a/src/components/views/rooms/SearchResultTile.tsx +++ b/src/components/views/rooms/SearchResultTile.tsx @@ -41,8 +41,8 @@ export default class SearchResultTile extends React.Component { // A map of private callEventGroupers = new Map(); - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.buildLegacyCallEventGroupers(this.props.timeline); } diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index b3767cbd2a..0ccef46a91 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -249,8 +249,8 @@ export class SendMessageComposer extends React.Component) { - super(props, context); + public constructor(props: ISendMessageComposerProps) { + super(props); if (this.props.mxClient.getCrypto() && this.props.mxClient.isRoomEncrypted(this.props.room.roomId)) { this.prepareToEncrypt = throttle( diff --git a/src/components/views/rooms/VoiceRecordComposerTile.tsx b/src/components/views/rooms/VoiceRecordComposerTile.tsx index a8335a9902..9805fed2c4 100644 --- a/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -56,8 +56,8 @@ export default class VoiceRecordComposerTile extends React.PureComponent; private voiceRecordingId: string; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = {}; diff --git a/src/components/views/settings/CryptographyPanel.tsx b/src/components/views/settings/CryptographyPanel.tsx index 4c92e8a22d..eeffdc78ef 100644 --- a/src/components/views/settings/CryptographyPanel.tsx +++ b/src/components/views/settings/CryptographyPanel.tsx @@ -34,10 +34,10 @@ export default class CryptographyPanel extends React.Component { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { + public constructor(props: IProps) { super(props); - if (!context.getCrypto()) { + if (!this.context.getCrypto()) { this.state = { deviceIdentityKey: null }; } else { this.state = { deviceIdentityKey: undefined }; diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx index 31c361de1b..05b0a6d8b8 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx @@ -35,8 +35,8 @@ export default class GeneralRoomSettingsTab extends React.Component; - public constructor(props: IProps, context: ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { isRoomPublished: false, // loaded async diff --git a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx index 0764ca9722..0dc627247d 100644 --- a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx @@ -44,10 +44,10 @@ export default class NotificationsSettingsTab extends React.Component; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); - this.roomProps = EchoChamber.forRoom(context.getRoom(this.props.roomId)!); + this.roomProps = EchoChamber.forRoom(this.context.getRoom(this.props.roomId)!); let currentSound = "default"; const soundData = Notifier.getSoundForRoom(this.props.roomId); diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index a9b7ddd863..7afcf8fc57 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -62,8 +62,8 @@ export default class SecurityRoomSettingsTab extends React.Component; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); const state = this.props.room.currentState; diff --git a/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx b/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx index 972ca7bbf8..b521eeef9c 100644 --- a/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/HelpUserSettingsTab.tsx @@ -34,8 +34,8 @@ export default class HelpUserSettingsTab extends React.Component public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: IProps, context: React.ContextType) { - super(props, context); + public constructor(props: IProps) { + super(props); this.state = { appVersion: null, diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx index 47651dc6cc..71cece31a1 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.tsx @@ -53,8 +53,8 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> { public static contextType = MatrixClientContext; declare public context: React.ContextType; - public constructor(props: {}, context: React.ContextType) { - super(props, context); + public constructor(props: {}) { + super(props); this.state = { mediaDevices: null,