mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-28 17:00:54 +00:00
4.76.5
* Fixed: Current Channel profile rules not working correctly in mod view. * Fixed: The viewer count being detected incorrectly for users in some locales. * Changed: Add settings search support for several settings, such as blockable chat callout types.
This commit is contained in:
parent
15c33281ad
commit
1169d8fe64
5 changed files with 17 additions and 10 deletions
|
@ -104,20 +104,23 @@ export default class ModView extends Module {
|
|||
updateRoot(el) {
|
||||
const root = this.fine.getReactInstance(el);
|
||||
|
||||
let channel = null, node = root, j = 0, i;
|
||||
while(node != null && channel == null && j < 10) {
|
||||
let state = node.memoizedState;
|
||||
i = 0;
|
||||
let channel = null;
|
||||
let node = this.fine.searchNode(root, n => {
|
||||
let i = 0;
|
||||
let state = n.memoizedState;
|
||||
while(state != null && channel == null && i < 50) {
|
||||
channel = state?.memoizedState?.current?.result?.data?.user ??
|
||||
state?.memoizedState?.current?.previousData?.user;
|
||||
|
||||
if (!channel?.id || !channel?.login)
|
||||
channel = null;
|
||||
|
||||
state = state?.next;
|
||||
i++;
|
||||
}
|
||||
node = node?.child;
|
||||
j++;
|
||||
}
|
||||
if (channel)
|
||||
return true;
|
||||
});
|
||||
|
||||
if ( channel?.id ) {
|
||||
if ( this._cached_id != channel.id ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue