Browse Source

Disable chat slicing on scroll

master
Eduard Kuzmenko 3 years ago
parent
commit
02cfa48dd8
  1. 9
      src/components/chat/bubbles.ts

9
src/components/chat/bubbles.ts

@ -682,9 +682,9 @@ export default class ChatBubbles {
} }
}); });
if(!IS_SAFARI) { // if(!IS_SAFARI) {
this.sliceViewportDebounced = debounce(this.sliceViewport.bind(this), 100, false, true); // this.sliceViewportDebounced = debounce(this.sliceViewport.bind(this), 100, false, true);
} // }
let middleware: ReturnType<ChatBubbles['getMiddleware']>; let middleware: ReturnType<ChatBubbles['getMiddleware']>;
useHeavyAnimationCheck(() => { useHeavyAnimationCheck(() => {
@ -4047,7 +4047,8 @@ export default class ChatBubbles {
scrollSaver.restore(history.length === 1 && !reverse ? false : true); scrollSaver.restore(history.length === 1 && !reverse ? false : true);
const state = scrollSaver.getSaved(); const state = scrollSaver.getSaved();
if(state.scrollHeight !== state.clientHeight) { const isLoading = !this.preloader.detached;
if(state.scrollHeight !== state.clientHeight || isLoading) {
/* for(const timestamp in this.dateMessages) { /* for(const timestamp in this.dateMessages) {
const dateMessage = this.dateMessages[timestamp]; const dateMessage = this.dateMessages[timestamp];
dateMessage.div.classList.add('is-sticky'); dateMessage.div.classList.add('is-sticky');

Loading…
Cancel
Save