clean up
This commit is contained in:
@@ -134,6 +134,8 @@ class MessagesView extends React.Component {
|
|||||||
|
|
||||||
this.readNotificationQueue = [];
|
this.readNotificationQueue = [];
|
||||||
this.readNotificationTimer = null;
|
this.readNotificationTimer = null;
|
||||||
|
|
||||||
|
this.keyPressTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getOrCreateMessageRef(seqId) {
|
getOrCreateMessageRef(seqId) {
|
||||||
@@ -515,7 +517,7 @@ class MessagesView extends React.Component {
|
|||||||
|
|
||||||
// Set up the timer if it's not running already.
|
// Set up the timer if it's not running already.
|
||||||
if (!this.readNotificationTimer) {
|
if (!this.readNotificationTimer) {
|
||||||
this.readNotificationTimer = setInterval(() => {
|
this.readNotificationTimer = setInterval(_ => {
|
||||||
if (this.readNotificationQueue.length == 0) {
|
if (this.readNotificationQueue.length == 0) {
|
||||||
// Shut down the timer if the queue is empty.
|
// Shut down the timer if the queue is empty.
|
||||||
clearInterval(this.readNotificationTimer);
|
clearInterval(this.readNotificationTimer);
|
||||||
|
|||||||
@@ -168,6 +168,9 @@ class TinodeWeb extends React.Component {
|
|||||||
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
||||||
|
|
||||||
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
||||||
|
|
||||||
|
// FIXME: this is unused.
|
||||||
|
this.callTimeoutTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getBlankState() {
|
getBlankState() {
|
||||||
@@ -1753,9 +1756,8 @@ class TinodeWeb extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleCallClose() {
|
handleCallClose() {
|
||||||
if (this.state.callTimeout) {
|
if (this.callTimeoutTimer) {
|
||||||
console.log('closing call timeout ', this.state.callTimeout);
|
clearTimeout(this.callTimeoutTimer);
|
||||||
clearTimeout(this.state.callTimeout);
|
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
callTopic: undefined,
|
callTopic: undefined,
|
||||||
@@ -1797,7 +1799,6 @@ class TinodeWeb extends React.Component {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'accept':
|
case 'accept':
|
||||||
console.log('TinodeWeb: received accept msg ', info);
|
|
||||||
// If another my session has accepted the call.
|
// If another my session has accepted the call.
|
||||||
if (Tinode.isMeTopicName(info.topic) && this.tinode.isMe(info.from)) {
|
if (Tinode.isMeTopicName(info.topic) && this.tinode.isMe(info.from)) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class CallPanel extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleICEGatheringStateChangeEvent(event) {
|
handleICEGatheringStateChangeEvent(event) {
|
||||||
console.log('ICE gathering change state: ', event);
|
// console.log('ICE gathering change state: ', event);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTrackEvent(event) {
|
handleTrackEvent(event) {
|
||||||
@@ -278,7 +278,7 @@ class CallPanel extends React.PureComponent {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.reportError(e.message);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-5
@@ -5539,6 +5539,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
|||||||
this.getOrCreateMessageRef = this.getOrCreateMessageRef.bind(this);
|
this.getOrCreateMessageRef = this.getOrCreateMessageRef.bind(this);
|
||||||
this.readNotificationQueue = [];
|
this.readNotificationQueue = [];
|
||||||
this.readNotificationTimer = null;
|
this.readNotificationTimer = null;
|
||||||
|
this.keyPressTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getOrCreateMessageRef(seqId) {
|
getOrCreateMessageRef(seqId) {
|
||||||
@@ -5914,7 +5915,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.readNotificationTimer) {
|
if (!this.readNotificationTimer) {
|
||||||
this.readNotificationTimer = setInterval(() => {
|
this.readNotificationTimer = setInterval(_ => {
|
||||||
if (this.readNotificationQueue.length == 0) {
|
if (this.readNotificationQueue.length == 0) {
|
||||||
clearInterval(this.readNotificationTimer);
|
clearInterval(this.readNotificationTimer);
|
||||||
this.readNotificationTimer = null;
|
this.readNotificationTimer = null;
|
||||||
@@ -7725,6 +7726,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
this.handleCallSendAnswer = this.handleCallSendAnswer.bind(this);
|
this.handleCallSendAnswer = this.handleCallSendAnswer.bind(this);
|
||||||
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
||||||
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
||||||
|
this.callTimeoutTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getBlankState() {
|
getBlankState() {
|
||||||
@@ -9370,9 +9372,9 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleCallClose() {
|
handleCallClose() {
|
||||||
if (this.state.callTimeout) {
|
if (this.callTimeoutTimer) {
|
||||||
console.log('closing call timeout ', this.state.callTimeout);
|
console.log('closing call timeout ', this.state.callTimeoutTimer);
|
||||||
clearTimeout(this.state.callTimeout);
|
clearTimeout(this.state.callTimeoutTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
@@ -11439,7 +11441,7 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
this.reportError(e.message);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11488,6 +11490,7 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleCloseClick() {
|
handleCloseClick() {
|
||||||
|
console.log("handleCloseClick", new Error("stacktrace"));
|
||||||
this.stop();
|
this.stop();
|
||||||
this.props.onHangup(this.props.topic, this.props.seq);
|
this.props.onHangup(this.props.topic, this.props.seq);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user