Fix loading new messages with saved position
This commit is contained in:
parent
411c7a8d9c
commit
1653733df4
@ -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…
x
Reference in New Issue
Block a user