You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-04 11:51:45 +03:00
tidy up event handler
This commit is contained in:
@@ -1373,17 +1373,19 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||||||
ready: true,
|
ready: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
cli.on('Call.incoming', function(call) {
|
|
||||||
// Check if the VoIP UI has been disabled
|
if (SettingsStore.getValue(UIFeature.Voip)) {
|
||||||
if (!SettingsStore.getValue(UIFeature.Voip)) return;
|
cli.on('Call.incoming', function(call) {
|
||||||
// we dispatch this synchronously to make sure that the event
|
// we dispatch this synchronously to make sure that the event
|
||||||
// handlers on the call are set up immediately (so that if
|
// handlers on the call are set up immediately (so that if
|
||||||
// we get an immediate hangup, we don't get a stuck call)
|
// we get an immediate hangup, we don't get a stuck call)
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'incoming_call',
|
action: 'incoming_call',
|
||||||
call: call,
|
call: call,
|
||||||
}, true);
|
}, true);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
cli.on('Session.logged_out', function(errObj) {
|
cli.on('Session.logged_out', function(errObj) {
|
||||||
if (Lifecycle.isLoggingOut()) return;
|
if (Lifecycle.isLoggingOut()) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user