1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-06 22:30:57 +00:00

4.0.0-rc12.21

* Fixed: Merge User and Room objects when ID and login are both known at once.
* Fixed: Spacing and sorting of metadata beneath the player. (Closes %520)
* Fixed: Update the settings menu when new settings are added while the menu is open. (Closes #523)
* Fixed: Do not maximize or minimize the settings window when double-clicking in the search box. (Closes #521)
This commit is contained in:
SirStendec 2018-09-24 14:33:06 -04:00
parent 5aaa7773de
commit 8c0b4b8bad
11 changed files with 174 additions and 15 deletions

View file

@ -42,6 +42,25 @@ export default class User {
}
}
merge(other) {
if ( ! this.login && other.login )
this.login = other.login;
if ( other.emote_sets && other.emote_sets._sources ) {
for(const [provider, sets] of other.emote_sets._sources.entries()) {
for(const set_id of sets)
this.addSet(provider, set_id);
}
}
if ( other.badges && other.badges._sources ) {
for(const [provider, badges] of other.badges._sources.entries()) {
for(const badge of badges)
this.addBadge(provider, badge.id, badge);
}
}
}
get id() {
return this._id;
}
@ -70,6 +89,8 @@ export default class User {
if ( old_user && old_user !== this )
old_user.login = null;
// Make sure we didn't have a funky loop thing happen.
this._login = val;
obj.users[val] = this;
}