bug fixed

This commit is contained in:
richard-loafle 2020-02-06 10:34:44 +09:00
parent 5d3938addd
commit 739925911d
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,7 @@
>
<div #chatMessagesContainer class="chat-messages">
<div
*ngIf="eventRemained && !!eventList && eventList.length > 0"
*ngIf="initalized && eventRemained && !!eventList && eventList.length > 0"
class="message-row view-previous"
>
<button mat-button (click)="onClickMore($event)" class="bg-accent-dark">

View File

@ -155,6 +155,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
existReadToHereEvent = true;
hidden = false;
swapped = false;
initalized = false;
constructor(
private logger: NGXLogger,
@ -171,6 +172,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
});
this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => {
this.roomInfo = roomInfo;
this.initalized = false;
/** [S] initializing by changed room */
// reset :: roomLastEventSeq
@ -532,7 +534,9 @@ export class MessagesComponent implements OnInit, OnDestroy {
this.swapScrollTo(
this.eventList[this.eventList.length - 1],
() => {},
() => {},
() => {
this.initalized = true;
},
-1 === this.virtualScroller.viewPortInfo.endIndex ||
!isInViewPortItems,
!isInViewPortItems