This commit is contained in:
leejinho 2020-02-05 14:10:34 +09:00
parent 68fae90bfc
commit 1a46307df7
3 changed files with 28 additions and 10 deletions

View File

@ -272,6 +272,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
if (
!this.roomInfoSubject.value ||
(!!this.roomInfoSubject.value &&
!!roomInfo &&
this.roomInfoSubject.value.roomSeq !== roomInfo.roomSeq)
) {
this.clearView();

View File

@ -17,7 +17,14 @@ import {
messageUpdate,
messageUpdateFailure
} from './actions';
import { tap, switchMap, map, catchError, exhaustMap } from 'rxjs/operators';
import {
tap,
switchMap,
map,
catchError,
exhaustMap,
delay
} from 'rxjs/operators';
import {
StatusProtocolService,
SSVC_TYPE_STATUS_BULK_INFO_DATA,
@ -120,14 +127,20 @@ export class Effects {
)
);
myStatusCheck$ = createEffect(() =>
this.actions$.pipe(
ofType(AuthStore.loginSuccess),
map(action => action.loginRes),
map(loginRes => {
return bulkInfo({ divCd: 'bulk', userSeqs: [loginRes.userSeq] });
})
)
myStatusCheck$ = createEffect(
() =>
this.actions$.pipe(
ofType(AuthStore.loginSuccess),
map(action => action.loginRes),
delay(5000),
tap(loginRes => {
this.store.dispatch(
bulkInfo({ divCd: 'mybulk', userSeqs: [loginRes.userSeq] })
);
// return bulkInfo({ divCd: 'bulk', userSeqs: [loginRes.userSeq] });
})
),
{ dispatch: false }
);
constructor(

View File

@ -181,7 +181,11 @@ export class MessagesComponent implements OnInit, OnDestroy {
this.existReadToHereEvent = true;
/** [E] initializing by changed room */
if (this.roomInfo.roomSeq !== roomInfo.roomSeq) {
if (
!!this.roomInfo &&
!!roomInfo &&
this.roomInfo.roomSeq !== roomInfo.roomSeq
) {
this.initEventMore();
}
});