1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 18:26:57 +00:00

3.5.379. Fix chat breaking due to unloaded badge data. Fix host mode not starting correctly. Add name_key parameter to API constructor. Use name_key for badge classes rather than id to give badges added by the API stable, predictable classnames.

This commit is contained in:
SirStendec 2016-11-23 16:41:49 -05:00
parent caa68c507c
commit 32f3e9b20b
8 changed files with 60 additions and 55 deletions

View file

@ -92,9 +92,8 @@ FFZ.prototype.setup_bits = function() {
Service.reopen({
ffz_get_tier: function(prefix, amount) {
var config = this.get('config') || {},
pre_config = config[prefix] || {},
tiers = pre_config.tiers || [],
var config = this._getConfigPrefix(prefix) || {},
tiers = config.tiers || [],
tier = null,
index = null;
@ -148,21 +147,15 @@ FFZ.prototype.setup_bits = function() {
var output = [],
config = this.get('config') || {prefixes: []};
f.log("update_css start");
for(var i=0; i < config.prefixes.length; i++) {
var prefix = config.prefixes[i],
data = config[prefix],
tiers = data && data.tiers;
f.log("prefix: " + prefix + " -- tiers: " + tiers.length, tiers);
for(var x=0; x < tiers.length; x++)
output.push(this._ffz_tier_css(x, prefix, tiers[x]));
}
f.log("update_css end", output.join(''));
utils.update_css(f._chat_style, 'bit-styles', output.join(''));
}.observes('config')

View file

@ -99,7 +99,7 @@ FFZ.prototype.setup_profile_following = function() {
// Modify followed items.
this.update_views('component:display-followed-item', this.modify_display_followed_item);
//this.update_views('component:display-followed-item', this.modify_display_followed_item);
this.update_views('component:twitch-profile-card', this.modify_twitch_profile_card);
}
@ -180,7 +180,7 @@ FFZ.prototype.modify_twitch_profile_card = function(component) {
}
FFZ.prototype.modify_display_followed_item = function(component) {
/*FFZ.prototype.modify_display_followed_item = function(component) {
var f = this;
utils.ember_reopen_view(component, {
ffzParentModel: function() {
@ -305,4 +305,4 @@ FFZ.prototype.modify_display_followed_item = function(component) {
el.appendChild(actions);
}
});
}
}*/

View file

@ -2107,21 +2107,16 @@ FFZ.prototype._modify_room = function(room) {
delay = 3000 + Math.floor((percentile || 0) * Math.random());
}
if ( this.get("experiments.shouldSeeRedesign") ) {
var c = this.get("store").peekRecord("channel", channel.get("name"));
if ( c ) {
if ( target )
this.pendingFetchHostModeTarget = Ember.run.debounce(this, "fetchHostModeTarget", {
currentChannel: c,
targetName: target
}, delay);
else
c.set("hostModeTarget", null);
}
} else channel.setHostMode({
target: target, delay: delay
});
var c = this.get("store").peekRecord("channel", channel.get("name"));
if ( c ) {
if ( target )
this.pendingFetchHostModeTarget = Ember.run.debounce(this, "fetchHostModeTarget", {
currentChannel: c,
targetName: target
}, delay);
else
c.set("hostModeTarget", null);
}
}
},