mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-22 18:56:00 +02:00
* Some code cleanup
+ Bit of skeleton for TickerTextView * Detach of events in ViewController
This commit is contained in:
parent
eaf2aae48d
commit
d242546458
5 changed files with 104 additions and 4 deletions
|
@ -101,6 +101,10 @@ ViewController.prototype.detachClientEvents = function() {
|
|||
this.client.removeListener('key press', this.onClientKeyPress);
|
||||
this.client.removeListener('special key', this.onClientSpecialKeyPress);
|
||||
|
||||
for(var id in this.views) {
|
||||
this.views[id].removeAllListeners();
|
||||
}
|
||||
|
||||
this.attached = false;
|
||||
};
|
||||
|
||||
|
@ -179,7 +183,7 @@ ViewController.prototype.loadFromMCIMap = function(mciMap) {
|
|||
|
||||
if(view) {
|
||||
view.on('action', self.onViewAction);
|
||||
self.addView(view); // :TODO: Needs detached
|
||||
self.addView(view);
|
||||
view.redraw(); // :TODO: This can result in double redraw() if we set focus on this item after
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue