message notification is modified

This commit is contained in:
병준 박 2019-12-23 14:47:35 +09:00
parent e417c995ef
commit 77ac22d122

View File

@ -5,7 +5,8 @@ import {
Inject, Inject,
OnDestroy, OnDestroy,
ViewChild, ViewChild,
ChangeDetectorRef ChangeDetectorRef,
NgZone
} from '@angular/core'; } from '@angular/core';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
@ -86,6 +87,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
constructor( constructor(
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService, @Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
private store: Store<any>, private store: Store<any>,
private ngZone: NgZone,
private statusProtocolService: StatusProtocolService, private statusProtocolService: StatusProtocolService,
private messageApiService: MessageApiService, private messageApiService: MessageApiService,
private daesangProtocolService: DaesangProtocolService, private daesangProtocolService: DaesangProtocolService,
@ -153,39 +155,41 @@ export class MainPageComponent implements OnInit, OnDestroy {
.subscribe(messageSeq => { .subscribe(messageSeq => {
console.log(messageSeq); console.log(messageSeq);
// this.messageApiService this.ngZone.run(() => {
// .detailMessage({ this.messageApiService
// userSeq: this.loginRes.userSeq, .detailMessage({
// deviceType: this.environmentsInfo.deviceType, userSeq: this.loginRes.userSeq,
// tokenKey: this.loginRes.tokenString, deviceType: this.environmentsInfo.deviceType,
// type: MessageType.Receive, tokenKey: this.loginRes.tokenString,
// msgId: Number(messageSeq) type: MessageType.Receive,
// } as DetailRequest) msgId: Number(messageSeq)
// .pipe( } as DetailRequest)
// take(1), .pipe(
// map(res => { take(1),
// if (res.responseCode === MessageStatusCode.Success) { map(res => {
// // detail view.. if (res.responseCode === MessageStatusCode.Success) {
// this.dialogService.open< // detail view..
// MessageDetailDialogComponent, this.dialogService.open<
// MessageDetailDialogData, MessageDetailDialogComponent,
// MessageDetailDialogResult MessageDetailDialogData,
// >(MessageDetailDialogComponent, { MessageDetailDialogResult
// width: '600px', >(MessageDetailDialogComponent, {
// data: { width: '600px',
// detail: res, data: {
// loginRes: this.loginRes, detail: res,
// environmentsInfo: this.environmentsInfo loginRes: this.loginRes,
// } environmentsInfo: this.environmentsInfo
// }); }
});
// // this.changeDetectorRef.detectChanges(); // this.changeDetectorRef.detectChanges();
// } else { } else {
// } }
// }), }),
// catchError(error => of(this.logger.error(error))) catchError(error => of(this.logger.error(error)))
// ) )
// .subscribe(); .subscribe();
});
}); });
this.loginResSubscription = this.store this.loginResSubscription = this.store