From 97cef335e8215c26a5df1d28ee6e241f1337ef75 Mon Sep 17 00:00:00 2001 From: Swapnil Raj Date: Thu, 30 Jul 2020 00:28:12 +0530 Subject: [PATCH] Cleanup types --- src/components/structures/{RightPanel.js => RightPanel.tsx} | 0 src/components/views/right_panel/HeaderButtons.tsx | 3 ++- src/dispatcher/payloads/AfterRightPanelPhaseChangePayload.ts | 2 ++ src/dispatcher/payloads/SetRightPanelPhasePayload.ts | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) rename src/components/structures/{RightPanel.js => RightPanel.tsx} (100%) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.tsx similarity index 100% rename from src/components/structures/RightPanel.js rename to src/components/structures/RightPanel.tsx diff --git a/src/components/views/right_panel/HeaderButtons.tsx b/src/components/views/right_panel/HeaderButtons.tsx index 8141e8a9cc..499fbbd414 100644 --- a/src/components/views/right_panel/HeaderButtons.tsx +++ b/src/components/views/right_panel/HeaderButtons.tsx @@ -24,6 +24,7 @@ import RightPanelStore from "../../../stores/RightPanelStore"; import {RightPanelPhases} from "../../../stores/RightPanelStorePhases"; import {Action} from '../../../dispatcher/actions'; import {SetRightPanelPhasePayload, SetRightPanelPhaseRefireParams} from '../../../dispatcher/payloads/SetRightPanelPhasePayload'; +import {EventSubscription} from "fbemitter"; export enum HeaderKind { Room = "room", @@ -38,7 +39,7 @@ interface IState { interface IProps {} export default class HeaderButtons extends React.Component { - private storeToken: ReturnType; + private storeToken: EventSubscription; private dispatcherRef: string; constructor(props: IProps, kind: HeaderKind) { diff --git a/src/dispatcher/payloads/AfterRightPanelPhaseChangePayload.ts b/src/dispatcher/payloads/AfterRightPanelPhaseChangePayload.ts index 3193f9043b..cfd4a2d3cc 100644 --- a/src/dispatcher/payloads/AfterRightPanelPhaseChangePayload.ts +++ b/src/dispatcher/payloads/AfterRightPanelPhaseChangePayload.ts @@ -18,10 +18,12 @@ import { RightPanelPhases } from "../../stores/RightPanelStorePhases"; import { SetRightPanelPhaseRefireParams } from "./SetRightPanelPhasePayload"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; +import { VerificationRequest } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest"; interface AfterRightPanelPhaseChangeAction extends ActionPayload { action: Action.AfterRightPanelPhaseChange; phase: RightPanelPhases; + verificationRequestPromise?: Promise; } export type AfterRightPanelPhaseChangePayload diff --git a/src/dispatcher/payloads/SetRightPanelPhasePayload.ts b/src/dispatcher/payloads/SetRightPanelPhasePayload.ts index b7dd5d85fc..75dea9f3df 100644 --- a/src/dispatcher/payloads/SetRightPanelPhasePayload.ts +++ b/src/dispatcher/payloads/SetRightPanelPhasePayload.ts @@ -24,7 +24,7 @@ export interface SetRightPanelPhasePayload extends ActionPayload { action: Action.SetRightPanelPhase; phase: RightPanelPhases; - refireParams: SetRightPanelPhaseRefireParams; + refireParams?: SetRightPanelPhaseRefireParams; } export interface SetRightPanelPhaseRefireParams {