mirror of https://github.com/vector-im/riot-web
				
				
				
			Cast dispatcher payloads correctly when firing them
							parent
							
								
									d5e70dfaa5
								
							
						
					
					
						commit
						71b356a9a4
					
				|  | @ -1093,7 +1093,7 @@ export default class CallHandler extends EventEmitter { | |||
|      */ | ||||
|     public showTransferDialog(call: MatrixCall): void { | ||||
|         call.setRemoteOnHold(true); | ||||
|         dis.dispatch({ | ||||
|         dis.dispatch<OpenInviteDialogPayload>({ | ||||
|             action: Action.OpenInviteDialog, | ||||
|             kind: KIND_CALL_TRANSFER, | ||||
|             call, | ||||
|  | @ -1104,7 +1104,7 @@ export default class CallHandler extends EventEmitter { | |||
|                     call.setRemoteOnHold(false); | ||||
|                 } | ||||
|             }, | ||||
|         } as OpenInviteDialogPayload); | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     private addCallForRoom(roomId: string, call: MatrixCall, changedRooms = false): void { | ||||
|  |  | |||
|  | @ -154,10 +154,10 @@ export default class MessageContextMenu extends React.Component<IProps, IState> | |||
|     }; | ||||
| 
 | ||||
|     private onReportEventClick = (): void => { | ||||
|         dis.dispatch({ | ||||
|         dis.dispatch<OpenReportEventDialogPayload>({ | ||||
|             action: Action.OpenReportEventDialog, | ||||
|             event: this.props.mxEvent, | ||||
|         } as OpenReportEventDialogPayload); | ||||
|         }); | ||||
|         this.closeMenu(); | ||||
|     }; | ||||
| 
 | ||||
|  | @ -178,11 +178,11 @@ export default class MessageContextMenu extends React.Component<IProps, IState> | |||
|     }; | ||||
| 
 | ||||
|     private onForwardClick = (): void => { | ||||
|         dis.dispatch({ | ||||
|         dis.dispatch<OpenForwardDialogPayload>({ | ||||
|             action: Action.OpenForwardDialog, | ||||
|             event: this.props.mxEvent, | ||||
|             permalinkCreator: this.props.permalinkCreator, | ||||
|         } as OpenForwardDialogPayload); | ||||
|         }); | ||||
|         this.closeMenu(); | ||||
|     }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -157,11 +157,11 @@ export class RoomViewStore extends Store<ActionPayload> { | |||
| 
 | ||||
|             // Fired so we can reduce dependency on event emitters to this store, which is relatively
 | ||||
|             // central to the application and can easily cause import cycles.
 | ||||
|             dis.dispatch({ | ||||
|             dis.dispatch<ActiveRoomChangedPayload>({ | ||||
|                 action: Action.ActiveRoomChanged, | ||||
|                 oldRoomId: lastRoomId, | ||||
|                 newRoomId: this.state.roomId, | ||||
|             } as ActiveRoomChangedPayload); | ||||
|             }); | ||||
|         } | ||||
| 
 | ||||
|         this.__emitChange(); | ||||
|  |  | |||
|  | @ -66,10 +66,10 @@ export function showSpaceSettings(space: Room) { | |||
| } | ||||
| 
 | ||||
| export const showAddExistingRooms = (space: Room): void => { | ||||
|     dis.dispatch({ | ||||
|     dis.dispatch<OpenAddExistingToSpaceDialogPayload>({ | ||||
|         action: Action.OpenAddToExistingSpaceDialog, | ||||
|         space, | ||||
|     } as OpenAddExistingToSpaceDialogPayload); | ||||
|     }); | ||||
| }; | ||||
| 
 | ||||
| export const showCreateNewRoom = async (space: Room): Promise<boolean> => { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Travis Ralston
						Travis Ralston