mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-31 23:18:31 +00:00
4.20.52
* 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:
parent
5e5b328076
commit
b098e59f4c
4 changed files with 23 additions and 13 deletions
|
@ -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');
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue