Browse Source

Fix loading new messages with saved position

master
Eduard Kuzmenko 3 years ago
parent
commit
1653733df4
  1. 8
      src/components/chat/bubbles.ts

8
src/components/chat/bubbles.ts

@ -1587,10 +1587,16 @@ export default class ChatBubbles { @@ -1587,10 +1587,16 @@ export default class ChatBubbles {
this.chat.dispatchEvent('setPeer', lastMsgId, !isJump);
// warning
if(!lastMsgId || this.bubbles[topMessage] || lastMsgId === topMessage) {
if((!lastMsgId && !savedPosition) || this.bubbles[topMessage] || lastMsgId === topMessage) {
this.scrollable.loadedAll.bottom = true;
}
if(savedPosition) {
Promise.all([setPeerPromise, getHeavyAnimationPromise()]).then(() => {
this.scrollable.checkForTriggers();
});
}
this.log('scrolledAllDown:', this.scrollable.loadedAll.bottom);
//if(!this.unreaded.length && dialog) { // lol

Loading…
Cancel
Save