mirror of https://github.com/calzoneman/sync.git
Avoid O(N^2) loop when loading channel emotes on channel load
This commit is contained in:
parent
726a5bf7c4
commit
247cf770d0
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "3.55.0",
|
||||
"version": "3.55.1",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
|
@ -126,9 +126,7 @@ EmoteModule.prototype = Object.create(ChannelModule.prototype);
|
|||
|
||||
EmoteModule.prototype.load = function (data) {
|
||||
if ("emotes" in data) {
|
||||
for (var i = 0; i < data.emotes.length; i++) {
|
||||
this.emotes.updateEmote(data.emotes[i]);
|
||||
}
|
||||
this.emotes = new EmoteList(data.emotes);
|
||||
}
|
||||
|
||||
this.dirty = false;
|
||||
|
|
Loading…
Reference in New Issue