From e2d0744aa94de9efa12ad7a48cc04bebc3f3084e Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 18 Feb 2020 16:31:05 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20250?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-sidenav/message.component.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts index cedb70ce..6e10a40a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts @@ -44,7 +44,8 @@ import { import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO, - KEY_VER_INFO + KEY_VER_INFO, + MainMenu } from '@app/types'; import * as AppStore from '@app/store'; @@ -110,6 +111,7 @@ export class MessageBoxComponent messageTypeList: MessageTypeData[] = []; langChangeSubscription: Subscription; + messageActivatedSubscription: Subscription; constructor( private store: Store, @@ -255,9 +257,13 @@ export class MessageBoxComponent // 초기 검색은 수신함. this.getRetrieveMessage(MessageType.Receive, 0); - if (!!this.tabs) { - this.tabs.realignInkBar(); - } + this.messageActivatedSubscription = this.store + .pipe(select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex)) + .subscribe(menu => { + if (menu === MainMenu.Message && !!this.tabs) { + this.tabs.realignInkBar(); + } + }); this.setMessageTypeData(); this.langChangeSubscription = merge( @@ -283,6 +289,9 @@ export class MessageBoxComponent if (!!this.langChangeSubscription) { this.langChangeSubscription.unsubscribe(); } + if (!!this.messageActivatedSubscription) { + this.messageActivatedSubscription.unsubscribe(); + } } onSelectedIndexTab(value: number) {