From 5982cdae69546b939d78caaafd04eeaa06e93b82 Mon Sep 17 00:00:00 2001 From: leejh Date: Wed, 16 Oct 2019 10:54:06 +0900 Subject: [PATCH] bugfix --- .../messenger/components/left-sidenav/chat.component.ts | 8 +++----- .../messenger/components/left-sidenav/group.component.ts | 7 +++---- .../components/left-sidenav/organization.component.html | 2 +- .../components/left-sidenav/organization.component.ts | 5 +++++ .../layouts/messenger/components/messages.component.ts | 7 +++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts index 15b0020d..3a51757b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts @@ -29,7 +29,9 @@ export class ChatComponent implements OnInit, OnDestroy { roomList: RoomInfo[]; roomUserList: RoomUserDetailData[]; roomUserShortList: RoomUserData[]; - sessionVerinfo: VersionInfo2Response; + sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); roomSubscription: Subscription; @@ -59,10 +61,6 @@ export class ChatComponent implements OnInit, OnDestroy { }) ) .subscribe(); - - this.sessionVerinfo = this.sessionStorageService.get( - KEY_VER_INFO - ); } ngOnDestroy(): void { diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index 01e4f721..e9c3c934 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -61,7 +61,9 @@ export class GroupComponent implements OnInit, OnDestroy { loginRes: LoginResponse; loginResSubscription: Subscription; - sessionVerinfo: VersionInfo2Response; + sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); constructor( private store: Store, @@ -72,9 +74,6 @@ export class GroupComponent implements OnInit, OnDestroy { ngOnInit() { const loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); - this.sessionVerinfo = this.sessionStorageService.get( - KEY_VER_INFO - ); this.companyCode = loginInfo.companyCode; this.loginResSubscription = this.store diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html index 4683d146..995c7140 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html @@ -9,7 +9,7 @@
+ [userInfo]="userInfo" [checkable]="true" [sessionVerinfo]="sessionVerinfo">
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts index 5a7be66b..06cecc51 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts @@ -16,6 +16,8 @@ import * as QueryStore from '@app/store/messenger/query'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { LoginInfo, KEY_LOGIN_INFO } from '@app/types'; import { take, map, switchMap } from 'rxjs/operators'; +import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; +import { KEY_VER_INFO } from '@app/types/ver-info.type'; @Component({ selector: 'app-layout-chat-left-sidenav-organization', @@ -29,6 +31,9 @@ export class OrganizationComponent implements OnInit { selectedDepartmentStatus$: Observable; loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); + sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); constructor( private store: Store, diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 35f3b5ae..22598da6 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -42,7 +42,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked { roomInfoSubscription: Subscription; userInfoList$: Observable; eventListProcessing$: Observable; - sessionVerInfo: VersionInfo2Response; + sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); constructor( private store: Store, @@ -52,9 +54,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked { ngOnInit() { const loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); - this.sessionVerInfo = this.sessionStorageService.get( - KEY_VER_INFO - ); this.loginResSubscription = this.store .pipe(