mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppProcessStatusService {
|
||||
|
||||
status: 'resume' | 'pause' = 'resume'
|
||||
|
||||
constructor() {
|
||||
this.events()
|
||||
}
|
||||
|
||||
private events() {
|
||||
document.addEventListener('pause', () => {
|
||||
// console.log('App going to background');
|
||||
this.status = 'pause'
|
||||
});
|
||||
|
||||
document.addEventListener('resume', () => {
|
||||
// console.log('App going to background');
|
||||
this.status = 'resume'
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user