Added check for slicer
This commit is contained in:
parent
6a7fe6a8c4
commit
1dfd9ec3f6
@ -739,6 +739,8 @@ export class AppDialogsManager {
|
||||
public onChatsRegularScroll = () => {
|
||||
if(this.sliceTimeout) clearTimeout(this.sliceTimeout);
|
||||
this.sliceTimeout = window.setTimeout(() => {
|
||||
this.sliceTimeout = undefined;
|
||||
|
||||
/* const observer = new IntersectionObserver((entries) => {
|
||||
const
|
||||
});
|
||||
@ -747,13 +749,17 @@ export class AppDialogsManager {
|
||||
observer.observe(el);
|
||||
}); */
|
||||
|
||||
const scrollTopWas = this.scroll.scrollTop;
|
||||
//const scrollTopWas = this.scroll.scrollTop;
|
||||
|
||||
const rect = this.scroll.container.getBoundingClientRect();
|
||||
const children = Array.from(this.scroll.splitUp.children) as HTMLElement[];
|
||||
const firstElement = document.elementFromPoint(rect.x, rect.y) as HTMLElement;
|
||||
const lastElement = document.elementFromPoint(rect.x, rect.y + rect.height - 1) as HTMLElement;
|
||||
|
||||
if(!firstElement || !lastElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
const firstElementRect = firstElement.getBoundingClientRect();
|
||||
const elementOverflow = firstElementRect.y - rect.y;
|
||||
|
||||
@ -804,8 +810,6 @@ export class AppDialogsManager {
|
||||
const scrollTop = */
|
||||
|
||||
//this.scroll.scrollIntoView(firstElement, false);
|
||||
|
||||
this.sliceTimeout = undefined;
|
||||
}, 1e3);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user