feat: Crash Handler (#531)

Co-authored-by: Ven <vendicated@riseup.net>
This commit is contained in:
Nuckyz 2023-03-01 01:26:13 -03:00 committed by GitHub
parent c91b0df607
commit faa90eccd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 182 additions and 27 deletions

View file

@ -117,6 +117,7 @@ const ModalAPI = mapMangledModuleLazy("onCloseRequest:null!=", {
openModal: filters.byCode("onCloseRequest:null!="),
closeModal: filters.byCode("onCloseCallback&&"),
openModalLazy: m => m?.length === 1 && filters.byCode(".apply(this,arguments)")(m),
closeAllModals: filters.byCode(".value.key,")
});
/**
@ -142,3 +143,10 @@ export function openModal(render: RenderFunction, options?: ModalOptions, contex
export function closeModal(modalKey: string, contextKey?: string): void {
return ModalAPI.closeModal(modalKey, contextKey);
}
/**
* Close all open modals
*/
export function closeAllModals(): void {
return ModalAPI.closeAllModals();
}