Added deleting messages

This commit is contained in:
hydrabolt
2015-10-31 23:12:14 +00:00
parent 28308433da
commit a333548c00
10 changed files with 195 additions and 44 deletions

View File

@@ -68,6 +68,19 @@ var Cache = (function (_Array) {
}
};
Cache.prototype.remove = function remove(data) {
var index = this.indexOf(data);
if (~index) {
this.splice(index, 1);
} else {
var item = this.get("id", data.id);
if (item) {
this.splice(this.indexOf(item), 1);
}
}
return false;
};
return Cache;
})(Array);