Replace timeOutAction() with debounce

Replace delegateRun()
Revert my throttle/debounce setTimeout() to Function.prototype[throttle/debounce]
This commit is contained in:
djmaze 2020-08-18 20:24:17 +02:00
parent f6a55898c7
commit 97a73c6639
28 changed files with 225 additions and 372 deletions

View file

@ -539,20 +539,13 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
this.showFullInfo.subscribe(fCheckHeaderHeight);
this.message.subscribe(fCheckHeaderHeight);
var t;
addEventListener(
'resize',
()=>{
// throttle
if (!t) {
t = setTimeout(()=>{
setTimeout(fCheckHeaderHeight, 1);
setTimeout(fCheckHeaderHeight, 200);
setTimeout(fCheckHeaderHeight, 500);
t = 0;
}, 50);
}
}
(()=>{
setTimeout(fCheckHeaderHeight, 1);
setTimeout(fCheckHeaderHeight, 200);
setTimeout(fCheckHeaderHeight, 500);
}).throttle(50)
);
this.showFullInfo.subscribe((value) => {