()
| 120 | } |
| 121 | |
| 122 | destroy() { |
| 123 | if (!this.initialized) { |
| 124 | return; |
| 125 | } |
| 126 | this.initialized = false; |
| 127 | |
| 128 | this.roomService && |
| 129 | Array.from(this.roomService.collaEngineMap.values()).forEach((engine) => { |
| 130 | this.reset(engine.resourceId); |
| 131 | }); |
| 132 | |
| 133 | this.socket && this.socket.removeAllListeners(); |
| 134 | this.socket && this.socket.close(); |
| 135 | this.unBindBeforeUnload(); |
| 136 | this.store.dispatch(StoreActions.setConnected(false)); |
| 137 | this.resourceStashManager.destroy(); |
| 138 | } |
| 139 | |
| 140 | private static getResourceFetchAction(resourceType: ResourceType): any { |
| 141 | switch (resourceType) { |
no test coverage detected