performance

This commit is contained in:
Peter Maquiran
2023-06-11 20:17:10 +01:00
parent e6fc2f19f2
commit 2688b1e012
37 changed files with 543 additions and 257 deletions
+13 -1
View File
@@ -17,6 +17,7 @@ import { EventsService } from './events.service';
import { SortService } from './functions/sort.service';
import { customTask } from '../models/dailyworktask.model';
import { Router } from '@angular/router';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -75,10 +76,21 @@ export class TaskService {
this.updateAllProcess();
this.updateCount()
this.runCallback();
document.addEventListener('resume', function () {
this.loadAllTask();
});
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {