[이슈처리 5] MyTalk 에서 unread count 보이는 문제 수정. #2

This commit is contained in:
leejinho 2019-11-22 09:17:47 +09:00
parent c7f6222c58
commit 729a95e1eb
2 changed files with 16 additions and 7 deletions

View File

@ -171,11 +171,7 @@
[userInfos]="userInfoList" [userInfos]="userInfoList"
[loginRes]="loginRes" [loginRes]="loginRes"
[sessionVerInfo]="sessionVerInfo" [sessionVerInfo]="sessionVerInfo"
[isShowUnreadCount]=" [isShowUnreadCount]="getShowUnreadCount()"
roomInfo.roomType !== RoomType.Mytalk &&
roomInfo.roomType !== RoomType.Bot &&
roomInfo.roomType !== RoomType.Allim
"
(moreEvent)="onMoreEvent($event)" (moreEvent)="onMoreEvent($event)"
(massDetail)="onMassDetail($event)" (massDetail)="onMassDetail($event)"
(save)="onSave($event)" (save)="onSave($event)"

View File

@ -151,8 +151,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
snackBarPreviewEvent: MatSnackBarRef<SimpleSnackBar>; snackBarPreviewEvent: MatSnackBarRef<SimpleSnackBar>;
RoomType = RoomType;
constructor( constructor(
private store: Store<any>, private store: Store<any>,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
@ -355,6 +353,21 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
return true; return true;
} }
getShowUnreadCount(): boolean {
if (!this.roomInfo || this.roomInfo === undefined) {
return true;
}
if (
this.roomInfo.roomType === RoomType.Mytalk ||
this.roomInfo.roomType === RoomType.Bot ||
this.roomInfo.roomType === RoomType.Allim
) {
return false;
}
return true;
}
readyToReply(): void { readyToReply(): void {
setTimeout(() => { setTimeout(() => {
this.focusReplyInput(); this.focusReplyInput();