cleanup
This commit is contained in:
parent
2a02b75e42
commit
6457015406
@ -114,6 +114,7 @@ export default class App extends Component {
|
|||||||
clearInterval(this.statusTimer);
|
clearInterval(this.statusTimer);
|
||||||
clearTimeout(this.disableChatTimer);
|
clearTimeout(this.disableChatTimer);
|
||||||
clearInterval(this.streamDurationTimer);
|
clearInterval(this.streamDurationTimer);
|
||||||
|
window.removeEventListener('resize', this.handleWindowResize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch /config data
|
// fetch /config data
|
||||||
|
@ -56,6 +56,12 @@ export default class Chat extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
if (hasTouchScreen()) {
|
||||||
|
window.removeEventListener("orientationchange", setVHvar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setupWebSocketCallbacks() {
|
setupWebSocketCallbacks() {
|
||||||
this.websocket = this.props.websocket;
|
this.websocket = this.props.websocket;
|
||||||
if (this.websocket) {
|
if (this.websocket) {
|
||||||
|
@ -142,18 +142,3 @@ export function debounce(fn, time) {
|
|||||||
timeout = setTimeout(functionCall, time);
|
timeout = setTimeout(functionCall, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
const debouncedHandleResize = debounce(function handleResize() {
|
|
||||||
setDimensions({
|
|
||||||
height: window.innerHeight,
|
|
||||||
width: window.innerWidth
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
window.addEventListener('resize', debouncedHandleResize)
|
|
||||||
window.addEventListener('keyup', debounce((e) => {
|
|
||||||
console.log(e);
|
|
||||||
}, 1000));
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user