Add some return types

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-25 08:06:11 +02:00
parent f2204aa1ff
commit 3287d51b17
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D

View file

@ -53,15 +53,15 @@ export default class IncomingCallToast extends React.Component<IProps, IState> {
CallHandler.sharedInstance().addListener(CallHandlerEvent.SilencedCallsChanged, this.onSilencedCallsChanged);
};
public componentWillUnmount() {
public componentWillUnmount(): void {
CallHandler.sharedInstance().removeListener(CallHandlerEvent.SilencedCallsChanged, this.onSilencedCallsChanged);
}
private onSilencedCallsChanged = () => {
private onSilencedCallsChanged = (): void => {
this.setState({ silenced: CallHandler.sharedInstance().isCallSilenced(this.props.call.callId) });
};
private onAnswerClick= (e: React.MouseEvent) => {
private onAnswerClick= (e: React.MouseEvent): void => {
e.stopPropagation();
dis.dispatch({
action: 'answer',
@ -69,7 +69,7 @@ export default class IncomingCallToast extends React.Component<IProps, IState> {
});
};
private onRejectClick= (e: React.MouseEvent) => {
private onRejectClick= (e: React.MouseEvent): void => {
e.stopPropagation();
dis.dispatch({
action: 'reject',
@ -77,7 +77,7 @@ export default class IncomingCallToast extends React.Component<IProps, IState> {
});
};
private onSilenceClick = (e: React.MouseEvent) => {
private onSilenceClick = (e: React.MouseEvent): void => {
e.stopPropagation();
const callId = this.props.call.callId;
this.state.silenced ?