mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-19 19:14:53 +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);
|
let socket = io(roomId);
|
||||||
|
windowHandler.socket = socket;
|
||||||
|
|
||||||
FastClick.attach(document.body);
|
FastClick.attach(document.body);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import FileHandler from './fileHandler';
|
|||||||
|
|
||||||
export default class WindowHandler {
|
export default class WindowHandler {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
this._socket = null;
|
||||||
this._isActive = false;
|
this._isActive = false;
|
||||||
this.fileHandler = new FileHandler();
|
this.fileHandler = new FileHandler();
|
||||||
|
|
||||||
@ -24,6 +25,10 @@ export default class WindowHandler {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set socket(socket) {
|
||||||
|
this._socket = socket;
|
||||||
|
}
|
||||||
|
|
||||||
notifyFavicon() {
|
notifyFavicon() {
|
||||||
this.newMessages++;
|
this.newMessages++;
|
||||||
this.favicon.badge(this.newMessages);
|
this.favicon.badge(this.newMessages);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user