쪽지 발송 취소시 발송취소 대상의 리스트에서 삭제 해 주는 로직 추가.

This commit is contained in:
leejinho 2020-01-10 15:58:02 +09:00
parent 831283c10a
commit 0812e064a8
3 changed files with 37 additions and 15 deletions

View File

@ -31,7 +31,7 @@ import {
RetrieveResourceFileRequest, RetrieveResourceFileRequest,
CancelRequest CancelRequest
} from '@ucap-webmessenger/api-message'; } from '@ucap-webmessenger/api-message';
import { DeviceType, MimeUtil, FileUtil } from '@ucap-webmessenger/core'; import { MimeUtil, FileUtil } from '@ucap-webmessenger/core';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
@ -589,12 +589,23 @@ export class MessageDetailDialogComponent implements OnInit {
take(1), take(1),
map(async res => { map(async res => {
if (res.responseCode === MessageStatusCode.Success) { if (res.responseCode === MessageStatusCode.Success) {
this.receivers.forEach(user => { this.receivers = [
...this.receivers.map(user => {
if (cancelUserSeqs.indexOf(user.userSeq) >= 0) { if (cancelUserSeqs.indexOf(user.userSeq) >= 0) {
user.cancelYn = true; return {
user.readYn = false; userSeq: user.userSeq,
userName: user.userName,
cancelYn: true,
readDate: user.readDate,
readYn: false
};
} }
});
return user;
})
];
this.unReadUsers.deselectAll();
this.selectedUnreadUserSeqs = []; this.selectedUnreadUserSeqs = [];
this.rightDrawer.close(); this.rightDrawer.close();
} else { } else {

View File

@ -112,6 +112,7 @@ import { Dictionary } from '@ngrx/entity';
import { MessageType } from '@ucap-webmessenger/api-message'; import { MessageType } from '@ucap-webmessenger/api-message';
import { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types'; import { LogoutInfo, KEY_LOGOUT_INFO } from '@app/types';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { deleteMessageSuccess } from '@app/store/messenger/message';
@Injectable() @Injectable()
export class AppNotificationService { export class AppNotificationService {
@ -657,13 +658,19 @@ export class AppNotificationService {
noti noti
); );
console.log('TODO :: remove state logic'); // Remove one Receive Message
// // Receive Message List refresh.. if (!!noti && !!noti.keyId) {
// this.store.dispatch( this.store.dispatch(
// MessageStore.retrieveMessage({ deleteMessageSuccess({
// messageType: MessageType.Receive messageType: MessageType.Receive,
// }) msgList: [
// ); {
msgId: Number(noti.keyId)
}
]
})
);
}
} }
break; break;

View File

@ -12,6 +12,8 @@ export interface UmgDeleteNotiNotification extends ProtocolNotification {
senderSeq: number; senderSeq: number;
/** { 송신자정보 } */ /** { 송신자정보 } */
senderInfo: SenderInfo; senderInfo: SenderInfo;
/** keyID(s) */
keyId: string;
} }
export const decodeUmgDeleteNotiNotification: ProtocolDecoder<UmgDeleteNotiNotification> = ( export const decodeUmgDeleteNotiNotification: ProtocolDecoder<UmgDeleteNotiNotification> = (
@ -31,6 +33,8 @@ export const decodeUmgDeleteNotiNotification: ProtocolDecoder<UmgDeleteNotiNotif
/** 송신자SEQ(n) */ /** 송신자SEQ(n) */
senderSeq: Number(message.bodyList[0]), senderSeq: Number(message.bodyList[0]),
/** { 송신자정보 } */ /** { 송신자정보 } */
senderInfo senderInfo,
/** keyID(s) */
keyId: message.bodyList[2]
} as UmgDeleteNotiNotification); } as UmgDeleteNotiNotification);
}; };