tidy up event handler
parent
d1070c05dd
commit
dfabe79335
|
@ -1373,9 +1373,9 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
ready: true,
|
ready: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (SettingsStore.getValue(UIFeature.Voip)) {
|
||||||
cli.on('Call.incoming', function(call) {
|
cli.on('Call.incoming', function(call) {
|
||||||
// Check if the VoIP UI has been disabled
|
|
||||||
if (!SettingsStore.getValue(UIFeature.Voip)) return;
|
|
||||||
// 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)
|
||||||
|
@ -1384,6 +1384,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
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