mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-03 10:58:50 +03:00
Added back base for simple plugins hooks
This commit is contained in:
parent
fe4dbc729c
commit
830fa5b753
4 changed files with 57 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { doc, $htmlCL } from 'Common/Globals';
|
||||
import { runHook } from 'Common/Plugins';
|
||||
import { isNonEmptyArray, isFunction } from 'Common/Utils';
|
||||
|
||||
let currentScreen = null,
|
||||
|
|
@ -172,6 +173,8 @@ export function showScreenPopup(ViewModelClassToShow, params = []) {
|
|||
vm.modalVisibility(true);
|
||||
|
||||
vm.onShow && vm.onShow(...params);
|
||||
|
||||
runHook('view-model-on-show', [vm.name, vm.__vm, params]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -275,6 +278,8 @@ function screenOnRoute(screenName, subPart) {
|
|||
autofocus(ViewModelClass.__dom);
|
||||
|
||||
ViewModelClass.__vm.onShowWithDelay && setTimeout(()=>ViewModelClass.__vm.onShowWithDelay, 200);
|
||||
|
||||
runHook('view-model-on-show', [ViewModelClass.name, ViewModelClass.__vm, params]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue