This commit is contained in:
leejinho 2020-02-11 17:23:26 +09:00
parent 986ff4e928
commit a2f58613ff

View File

@ -175,10 +175,6 @@ export class MessagesComponent implements OnInit, OnDestroy {
this.loginRes = loginRes; this.loginRes = loginRes;
}); });
this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => { this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => {
if (!this.roomInfo || this.roomInfo.roomSeq !== roomInfo.roomSeq) {
this.baseEventSeq = 0;
}
this.roomInfo = roomInfo; this.roomInfo = roomInfo;
this.showMore = false; this.showMore = false;
@ -193,7 +189,11 @@ export class MessagesComponent implements OnInit, OnDestroy {
this.firstCheckReadHere = true; this.firstCheckReadHere = true;
/** [E] initializing by changed room */ /** [E] initializing by changed room */
if (!this.roomInfo || this.roomInfo.roomSeq !== roomInfo.roomSeq) { if (
!this.roomInfo ||
(!!this.roomInfo && this.roomInfo.roomSeq !== roomInfo.roomSeq)
) {
this.baseEventSeq = 0;
this.initEventMore(); this.initEventMore();
} }
}); });