mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Passing socket to window handler
This commit is contained in:
parent
c6670b56d6
commit
0762bbd15c
@ -44,6 +44,7 @@ $(function() {
|
||||
});
|
||||
|
||||
let socket = io(roomId);
|
||||
windowHandler.socket = socket;
|
||||
|
||||
FastClick.attach(document.body);
|
||||
|
||||
|
@ -2,6 +2,7 @@ import FileHandler from './fileHandler';
|
||||
|
||||
export default class WindowHandler {
|
||||
constructor() {
|
||||
this._socket = null;
|
||||
this._isActive = false;
|
||||
this.fileHandler = new FileHandler();
|
||||
|
||||
@ -24,6 +25,10 @@ export default class WindowHandler {
|
||||
return this;
|
||||
}
|
||||
|
||||
set socket(socket) {
|
||||
this._socket = socket;
|
||||
}
|
||||
|
||||
notifyFavicon() {
|
||||
this.newMessages++;
|
||||
this.favicon.badge(this.newMessages);
|
||||
|
Loading…
x
Reference in New Issue
Block a user