diff --git a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts index 16e7b11c..489bd5fc 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/common/dialogs/file-viewer.dialog.component.ts @@ -15,9 +15,6 @@ import { FileDownloadItem } from '@ucap-webmessenger/api'; import { CommonApiService } from '@ucap-webmessenger/api-common'; import { TranslateService } from '@ngx-translate/core'; import { FileProtocolService } from '@ucap-webmessenger/protocol-file'; -import { select, Store } from '@ngrx/store'; -import { Subscription } from 'rxjs'; -import * as AppStore from '@app/store'; export interface FileViewerDialogData { fileInfo: FileEventJson; @@ -35,8 +32,6 @@ export interface FileViewerDialogResult {} styleUrls: ['./file-viewer.dialog.component.scss'] }) export class FileViewerDialogComponent implements OnInit, OnDestroy { - loginResSubscription: Subscription; - fileInfo: FileEventJson; downloadUrl: string; userSeq: number; @@ -56,7 +51,6 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { private snackBarService: SnackBarService, private commonApiService: CommonApiService, private fileProtocolService: FileProtocolService, - private store: Store, private logger: NGXLogger ) { this.fileInfo = data.fileInfo; @@ -76,24 +70,9 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy { ); } - ngOnInit() { - this.loginResSubscription = this.store - .pipe( - select(AppStore.AccountSelector.AuthenticationSelector.loginRes), - tap(loginRes => { - if (!loginRes) { - this.onClosedViewer(); - } - }) - ) - .subscribe(); - } + ngOnInit() {} - ngOnDestroy(): void { - if (!!this.loginResSubscription) { - this.loginResSubscription.unsubscribe(); - } - } + ngOnDestroy(): void {} onDownload(fileDownloadItem: FileDownloadItem): void { this.commonApiService diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss index 1ee9592c..555bb867 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss @@ -176,6 +176,7 @@ ::ng-deep .chat-snackbar-class { .mat-simple-snackbar { + justify-content: center; span { @include ellipsis(1); } 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 69c28335..1c92a9b5 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 @@ -974,32 +974,36 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { onExistNewMessage(info: Info) { let message = ''; - const senderUser = this.userInfoListSubject.value.filter( - user => user.seq === info.senderSeq - ); - if (!!senderUser && senderUser.length > 0) { - message += `${senderUser[0].name} : `; - } - message += StringUtil.convertFinalEventMessage( + const contents = StringUtil.convertFinalEventMessage( info.type, info.sentMessageJson || info.sentMessage ); - this.snackBarPreviewEvent = this.snackBarService.open( - message, - this.translateService.instant('common.messages.confirm'), - { - // duration: 3000, - verticalPosition: 'bottom', - horizontalPosition: 'center', - panelClass: ['chat-snackbar-class'] + if (!!contents) { + const senderUser = this.userInfoListSubject.value.filter( + user => user.seq === info.senderSeq + ); + if (!!senderUser && senderUser.length > 0) { + message += `${senderUser[0].name} : `; } - ); - this.snackBarPreviewEvent.onAction().subscribe(() => { - this.chatMessages.initEventMore(); - this.chatMessages.scrollToBottom(); - this.snackBarPreviewEvent.dismiss(); - }); + message += contents; + + this.snackBarPreviewEvent = this.snackBarService.open( + message, + this.translateService.instant('common.messages.confirm'), + { + // duration: 3000, + verticalPosition: 'bottom', + horizontalPosition: 'center', + panelClass: ['chat-snackbar-class'] + } + ); + this.snackBarPreviewEvent.onAction().subscribe(() => { + this.chatMessages.initEventMore(); + this.chatMessages.scrollToBottom(); + this.snackBarPreviewEvent.dismiss(); + }); + } } saveFile( @@ -1292,12 +1296,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { (message as Info).sentMessage ) ) { - this.snackBarService.open( - this.translateService.instant( - 'common.clipboard.results.copied' - ), - '확인' - ); this.snackBarService.open( this.translateService.instant( 'common.clipboard.results.copied' diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html index 94f5e39a..b6c1ddf5 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/notice.component.html @@ -43,7 +43,7 @@ -