bug fixed
This commit is contained in:
parent
74128a071a
commit
9e2a5bec76
|
@ -269,8 +269,12 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
this.roomInfoSubscription = this.store
|
||||
.pipe(select(AppStore.MessengerSelector.RoomSelector.roomInfo))
|
||||
.subscribe(roomInfo => {
|
||||
if (
|
||||
!this.roomInfoSubject.value ||
|
||||
(!!this.roomInfoSubject.value &&
|
||||
this.roomInfoSubject.value.roomSeq !== roomInfo.roomSeq)
|
||||
) {
|
||||
this.clearView();
|
||||
this.roomInfoSubject.next(roomInfo);
|
||||
|
||||
if (!!this.roomInfoSubject.value && !!this.interval) {
|
||||
clearInterval(this.interval);
|
||||
|
@ -285,6 +289,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
this.store.dispatch(EventStore.infoIntervalClear({}));
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
this.roomInfoSubject.next(roomInfo);
|
||||
});
|
||||
|
||||
this.userInfoListSubscription = this.store
|
||||
|
@ -326,12 +333,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
});
|
||||
|
||||
// [Daesang]
|
||||
this.eventListSubscription = combineLatest([
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.EventSelector.selectAllInfoList)
|
||||
),
|
||||
this.store.pipe(select(AppStore.MessengerSelector.RoomSelector.roomInfo))
|
||||
]).subscribe(([infoList, roomInfo]) => {
|
||||
this.eventListSubscription = this.store
|
||||
.pipe(select(AppStore.MessengerSelector.EventSelector.selectAllInfoList))
|
||||
.subscribe(infoList => {
|
||||
if (
|
||||
!!this.eventListSubject.value &&
|
||||
this.eventListSubject.value.length > 0
|
||||
|
@ -353,9 +357,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
if (
|
||||
!!infoList &&
|
||||
infoList.length > 0 &&
|
||||
!!roomInfo &&
|
||||
!!roomInfo.lastReadEventSeq &&
|
||||
this.baseEventSeq <= roomInfo.lastReadEventSeq
|
||||
!!this.roomInfoSubject.value &&
|
||||
!!this.roomInfoSubject.value.lastReadEventSeq &&
|
||||
this.baseEventSeq <= this.roomInfoSubject.value.lastReadEventSeq
|
||||
) {
|
||||
// 조회된 내용중에 read here 가 있을 경우.
|
||||
this.firstCheckReadHere = false;
|
||||
|
|
|
@ -169,14 +169,6 @@ export class MessagesComponent implements OnInit, OnDestroy {
|
|||
this.loginRes = loginRes;
|
||||
});
|
||||
this.roomInfoSubscription = this.roomInfo$.subscribe(roomInfo => {
|
||||
// this.eventList = undefined;
|
||||
// this.newEventList = undefined;
|
||||
// this.searchedList = undefined;
|
||||
// this.eventInfoStatus = undefined;
|
||||
// this.eventRemained = undefined;
|
||||
// this.userInfos = undefined;
|
||||
|
||||
this.initEventMore();
|
||||
this.roomInfo = roomInfo;
|
||||
|
||||
/** [S] initializing by changed room */
|
||||
|
@ -188,6 +180,10 @@ export class MessagesComponent implements OnInit, OnDestroy {
|
|||
this.readToHereEvent = undefined;
|
||||
this.existReadToHereEvent = true;
|
||||
/** [E] initializing by changed room */
|
||||
|
||||
if (this.roomInfo.roomSeq !== roomInfo.roomSeq) {
|
||||
this.initEventMore();
|
||||
}
|
||||
});
|
||||
this.eventListSubscription = this.eventList$.subscribe(eventList => {
|
||||
this.eventList = eventList;
|
||||
|
@ -529,7 +525,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
|
|||
this.eventList[this.eventList.length - 1],
|
||||
() => {},
|
||||
() => {},
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user