add plugin hook for config
This commit is contained in:
parent
a9dcbedf99
commit
4518f96e3d
1 changed files with 9 additions and 2 deletions
|
|
@ -68,7 +68,12 @@ export namespace Plugin {
|
|||
return state().then((x) => x.hooks)
|
||||
}
|
||||
|
||||
export function init() {
|
||||
export async function init() {
|
||||
const hooks = await state().then((x) => x.hooks)
|
||||
const config = await Config.get()
|
||||
for (const hook of hooks) {
|
||||
hook.config?.(config)
|
||||
}
|
||||
Bus.subscribeAll(async (input) => {
|
||||
const hooks = await state().then((x) => x.hooks)
|
||||
for (const hook of hooks) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue