mirror of https://github.com/vector-im/riot-web
tidy up event handler
parent
d1070c05dd
commit
dfabe79335
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue