1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-01 15:38:31 +00:00
* Fixed: Bug with room API handling that prevented the application of channel-specific user badges.
* Fixed: Issue applying username color adjustments with certain background colors. (Closes #945)
* Fixed: Automatic Theater Mode applying incorrectly on user sub-pages. (Closes #942)
This commit is contained in:
SirStendec 2020-11-25 19:27:25 -05:00
parent 5e5b328076
commit b098e59f4c
4 changed files with 23 additions and 13 deletions

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.20.51",
"version": "4.20.52",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0",
"scripts": {

View file

@ -307,7 +307,7 @@ export default class Room {
this.manager.emotes.loadSetData(set_id, data.sets[set_id]);
const badges = data.user_badges;
const badges = d.user_badges;
if ( badges )
for(const badge_id in badges)
if ( has(badges, badge_id) )
@ -315,8 +315,8 @@ export default class Room {
this.getUser(undefined, user).addBadge('ffz', badge_id);
if ( data.css )
this.style.set('css', data.css);
if ( d.css )
this.style.set('css', d.css);
else
this.style.delete('css');

View file

@ -599,17 +599,27 @@ export default class ChatHook extends Module {
c = this.colors,
ic = this.inverse_colors;
let chat_color = this.chat.context.get('theme.color.chat-background') ||
this.chat.context.get('theme.color.background');
let chat_dark = is_dark,
chat_color = Color.RGBA.fromCSS(
this.chat.context.get('theme.color.chat-background') ||
this.chat.context.get('theme.color.background')
);
if ( ! Color.RGBA.fromCSS(chat_color) )
chat_color = is_dark ? '#191919' : '#E0E0E0';
if ( chat_color )
chat_dark = chat_color.luminance() < 0.5;
let chat_text = this.chat.context.get('theme.color.chat-text') ||
this.chat.context.get('theme.color.text');
chat_color = chat_dark ? '#191919' : '#E0E0E0';
if ( ! Color.RGBA.fromCSS(chat_text) )
chat_text = is_dark ? '#dad8de' : '#19171c';
let text_dark = ! chat_dark,
chat_text = Color.RGBA.fromCSS(
this.chat.context.get('theme.color.chat-text') ||
this.chat.context.get('theme.color.text')
);
if ( chat_text )
text_dark = chat_text.luminance() < 0.5;
chat_text = text_dark ? '#dad8de' : '#19171c';
// TODO: Get the background color from the theme system.
// Updated: Use the lightest/darkest colors from alternating rows for better readibility.

View file

@ -1536,7 +1536,7 @@ export default class Player extends Module {
if ( ! this.settings.get('player.theatre.auto-enter') || ! inst._ffz_mounted )
return;
if ( this.router.current_name === 'user-home' )
if ( this.router.current_name !== 'user' )
return;
if ( inst.props.channelHomeLive || inst.props.channelHomeCarousel || inst.props.theatreModeEnabled )