clean up
This commit is contained in:
@@ -134,6 +134,8 @@ class MessagesView extends React.Component {
|
||||
|
||||
this.readNotificationQueue = [];
|
||||
this.readNotificationTimer = null;
|
||||
|
||||
this.keyPressTimer = null;
|
||||
}
|
||||
|
||||
getOrCreateMessageRef(seqId) {
|
||||
@@ -515,7 +517,7 @@ class MessagesView extends React.Component {
|
||||
|
||||
// Set up the timer if it's not running already.
|
||||
if (!this.readNotificationTimer) {
|
||||
this.readNotificationTimer = setInterval(() => {
|
||||
this.readNotificationTimer = setInterval(_ => {
|
||||
if (this.readNotificationQueue.length == 0) {
|
||||
// Shut down the timer if the queue is empty.
|
||||
clearInterval(this.readNotificationTimer);
|
||||
|
||||
@@ -168,6 +168,9 @@ class TinodeWeb extends React.Component {
|
||||
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
||||
|
||||
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
||||
|
||||
// FIXME: this is unused.
|
||||
this.callTimeoutTimer = null;
|
||||
}
|
||||
|
||||
getBlankState() {
|
||||
@@ -1753,9 +1756,8 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
|
||||
handleCallClose() {
|
||||
if (this.state.callTimeout) {
|
||||
console.log('closing call timeout ', this.state.callTimeout);
|
||||
clearTimeout(this.state.callTimeout);
|
||||
if (this.callTimeoutTimer) {
|
||||
clearTimeout(this.callTimeoutTimer);
|
||||
}
|
||||
this.setState({
|
||||
callTopic: undefined,
|
||||
@@ -1797,7 +1799,6 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
break;
|
||||
case 'accept':
|
||||
console.log('TinodeWeb: received accept msg ', info);
|
||||
// If another my session has accepted the call.
|
||||
if (Tinode.isMeTopicName(info.topic) && this.tinode.isMe(info.from)) {
|
||||
this.setState({
|
||||
|
||||
@@ -256,7 +256,7 @@ class CallPanel extends React.PureComponent {
|
||||
}
|
||||
|
||||
handleICEGatheringStateChangeEvent(event) {
|
||||
console.log('ICE gathering change state: ', event);
|
||||
// console.log('ICE gathering change state: ', event);
|
||||
}
|
||||
|
||||
handleTrackEvent(event) {
|
||||
@@ -278,7 +278,7 @@ class CallPanel extends React.PureComponent {
|
||||
break;
|
||||
default:
|
||||
this.reportError(e.message);
|
||||
console.error('Error opening your camera and/or microphone: ' + e.message);
|
||||
console.error("Error opening your camera and/or microphone:", e.message);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user