import { VaultTimeoutService as BaseVaultTimeoutService } from "jslib-common/services/vaultTimeout.service" ; import { SafariApp } from "../browser/safariApp" ; export default class VaultTimeoutService extends BaseVaultTimeoutService { startCheck ( ) { this . checkVaultTimeout ( ) ; if ( this . platformUtilsService . isSafari ( ) ) { this . checkSafari ( ) ; } else { setInterval ( ( ) => this . checkVaultTimeout ( ) , 10 * 1000 ) ; } } async checkSafari ( ) { while ( true ) { try { await SafariApp . sendMessageToApp ( "sleep" ) ; this . checkVaultTimeout ( ) ; } catch ( e ) { console . log ( "Exception Safari VaultTimeout" , e ) ; } } } }