mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Replace timeOutAction() with debounce
Replace delegateRun() Revert my throttle/debounce setTimeout() to Function.prototype[throttle/debounce]
This commit is contained in:
parent
f6a55898c7
commit
97a73c6639
28 changed files with 225 additions and 372 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue