mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
Add reference counting for emote sets so that we know when to unload them. Create a class for Users so that we can use ref counting with them.
This commit is contained in:
parent
b04cd8a61a
commit
6c4966166a
5 changed files with 256 additions and 29 deletions
|
@ -186,6 +186,11 @@ export class SourcedSet {
|
|||
get(key) { return this._sources && this._sources.get(key) }
|
||||
has(key) { return this._sources ? this._sources.has(key) : false }
|
||||
|
||||
sourceIncludes(key, val) {
|
||||
const src = this._sources && this._sources.get(key);
|
||||
return src && src.includes(val);
|
||||
}
|
||||
|
||||
includes(val) {
|
||||
return this._cache.includes(val);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue