bug fixed

This commit is contained in:
richard-loafle 2020-02-10 18:05:47 +09:00
parent 3f4d863001
commit 2c71302e80
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
<div <div
*ngIf="eventRemained && !!eventList && eventList.length > 0" *ngIf="eventRemained && !!eventList && eventList.length > 0"
class="message-row view-previous" class="message-row view-previous"
[class.hide]="!scrollUpInitalized" [class.hide]="!showMore"
> >
<button mat-button (click)="onClickMore($event)" class="bg-accent-dark"> <button mat-button (click)="onClickMore($event)" class="bg-accent-dark">
<svg <svg

View File

@ -159,7 +159,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
existReadToHereEvent = true; existReadToHereEvent = true;
hidden = false; hidden = false;
swapped = false; swapped = false;
initalized = false; showMore = false;
constructor( constructor(
private logger: NGXLogger, private logger: NGXLogger,
@ -176,7 +176,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
}); });
this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => { this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => {
this.roomInfo = roomInfo; this.roomInfo = roomInfo;
this.initalized = false; this.showMore = false;
/** [S] initializing by changed room */ /** [S] initializing by changed room */
// reset :: roomLastEventSeq // reset :: roomLastEventSeq
@ -441,10 +441,10 @@ export class MessagesComponent implements OnInit, OnDestroy {
0, 0,
() => { () => {
setTimeout(() => { setTimeout(() => {
this.postSwapScroll(useHide, useSwap);
if (!!postCallback) { if (!!postCallback) {
postCallback(); postCallback();
} }
this.postSwapScroll(useHide, useSwap);
}); });
} }
); );
@ -549,7 +549,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
this.eventList[this.eventList.length - 1], this.eventList[this.eventList.length - 1],
() => {}, () => {},
() => { () => {
this.initalized = true; this.showMore = true;
}, },
-1 === this.virtualScroller.viewPortInfo.endIndex || -1 === this.virtualScroller.viewPortInfo.endIndex ||
!isInViewPortItems, !isInViewPortItems,