unsubscribe add

This commit is contained in:
leejinho 2019-12-03 08:51:49 +09:00
parent 05a52dd1d5
commit d5b6514f48
2 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import {
} from '@angular/core';
import { Subscription, of } from 'rxjs';
import { Store, select } from '@ngrx/store';
import { tap, map, catchError } from 'rxjs/operators';
import { tap, map, catchError, take } from 'rxjs/operators';
import { NGXLogger } from 'ngx-logger';
import * as AppStore from '@app/store';
@ -223,6 +223,7 @@ export class MessageBoxComponent
searchType === MessageSearchType.Contents ? searchStr : ''
} as RetrieveSearchRequest)
.pipe(
take(1),
map(res => {
if (res.responseCode === MessageStatusCode.Success) {
this.currentTotalCount = res.totalCount;
@ -256,6 +257,7 @@ export class MessageBoxComponent
pageCount: this.recieveCurrentPage
} as RetrieveRequest)
.pipe(
take(1),
map(res => {
if (res.responseCode === MessageStatusCode.Success) {
this.currentTotalCount = res.totalCount;
@ -282,6 +284,7 @@ export class MessageBoxComponent
pageCount: this.sendCurrentPage
} as RetrieveRequest)
.pipe(
take(1),
map(res => {
if (res.responseCode === MessageStatusCode.Success) {
this.currentTotalCount = res.totalCount;
@ -308,6 +311,7 @@ export class MessageBoxComponent
pageCount: this.reservationCurrentPage
} as RetrieveRequest)
.pipe(
take(1),
map(res => {
if (res.responseCode === MessageStatusCode.Success) {
this.currentTotalCount = res.totalCount;
@ -336,6 +340,7 @@ export class MessageBoxComponent
msgId: message.msgId
} as DetailRequest)
.pipe(
take(1),
map(async res => {
if (res.responseCode === MessageStatusCode.Success) {
// Badge Refresh in case Receive Message..
@ -389,6 +394,7 @@ export class MessageBoxComponent
msgList
} as DelRequest)
.pipe(
take(1),
map(async res => {
if (res.responseCode === MessageStatusCode.Success) {
} else {
@ -413,6 +419,7 @@ export class MessageBoxComponent
msgId: messageInfo.msgId
} as CancelReservationRequest)
.pipe(
take(1),
map(async res => {
if (res.responseCode === MessageStatusCode.Success) {
} else {

View File

@ -466,6 +466,7 @@ export class MessageDetailDialogComponent implements OnInit {
recvUserList
} as CancelRequest)
.pipe(
take(1),
map(async res => {
if (res.responseCode === MessageStatusCode.Success) {
this.receivers = this.receivers.filter(