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