1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00
* Fixed: Initialization problems in pop-out chat.
* Changed: Set a default size for emoji, to prevent rendering issues in any future cases where initialization breaks.
This commit is contained in:
SirStendec 2021-09-10 16:53:52 -04:00
parent 35c99df8aa
commit 032c8821df
3 changed files with 14 additions and 5 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "frankerfacez", "name": "frankerfacez",
"author": "Dan Salvato LLC", "author": "Dan Salvato LLC",
"version": "4.29.1", "version": "4.29.2",
"description": "FrankerFaceZ is a Twitch enhancement suite.", "description": "FrankerFaceZ is a Twitch enhancement suite.",
"private": true, "private": true,
"license": "Apache-2.0", "license": "Apache-2.0",

View file

@ -133,6 +133,7 @@
} }
.ffz-emoji { .ffz-emoji {
width: 1.8rem; height: 1.8rem;
width: calc(var(--ffz-chat-font-size) * 1.5); width: calc(var(--ffz-chat-font-size) * 1.5);
height: calc(var(--ffz-chat-font-size) * 1.5); height: calc(var(--ffz-chat-font-size) * 1.5);

View file

@ -85,11 +85,19 @@ export default class Apollo extends Module {
const root = this.fine.react, const root = this.fine.react,
inst = root && root.stateNode; inst = root && root.stateNode;
client = inst?.props?.client || root?.memoizedProps?.client; client = inst?.props?.client;
if ( root && ! client ) { if ( root && ! client ) {
client = this.fine.searchTree(null, n => n.props?.client?.queryManager, 500); let i=0, node = root;
if ( client ) while( ! client?.queryManager && node && i++ < 20 ) {
client = client?.props?.client; client = node?.memoizedProps?.client;
node = node?.child;
}
if ( ! client ) {
const host = this.fine.searchTree(null, n => n.props?.client?.queryManager, 500);
if ( host )
client = host.props.client;
}
} }
this.client = client; this.client = client;