fix(lib/react/native): do not do patches until wait matches
This commit is contained in:
parent
578b78dd7e
commit
b8ed2bf334
4 changed files with 6 additions and 7 deletions
4
lib/react/src/native/_internal.ts
Normal file
4
lib/react/src/native/_internal.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import type { RunApplicationCallback } from '@revenge-mod/react/types'
|
||||
|
||||
export const sBeforeRunApplication = new Set<RunApplicationCallback>()
|
||||
export const sAfterRunApplication = new Set<RunApplicationCallback>()
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { sAfterRunApplication, sBeforeRunApplication } from './patches'
|
||||
import { sAfterRunApplication, sBeforeRunApplication } from './_internal'
|
||||
import type { RunApplicationCallback } from '@revenge-mod/react/types'
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
import { after, before } from '@revenge-mod/patcher'
|
||||
import { ReactNative } from '..'
|
||||
import type { RunApplicationCallback } from '../types'
|
||||
|
||||
export const sBeforeRunApplication = new Set<RunApplicationCallback>()
|
||||
export const sAfterRunApplication = new Set<RunApplicationCallback>()
|
||||
import { sAfterRunApplication, sBeforeRunApplication } from './_internal'
|
||||
|
||||
before(ReactNative.AppRegistry, 'runApplication', args => {
|
||||
for (const cb of sBeforeRunApplication)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,2 @@
|
|||
// Initialize the wait immediately, so we don't miss the actual modules before the re-exports
|
||||
import '.'
|
||||
|
||||
import './native/patches'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue