message list bug fixed

This commit is contained in:
병준 박 2019-10-08 15:13:01 +09:00
parent 0b7d3d7603
commit c8f32c04e8
3 changed files with 11 additions and 6 deletions

View File

@ -61,10 +61,10 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
infoList.push({
seq: info[0],
type: info[1] as EventType,
senderSeq: info[2],
sendDate: info[3],
senderSeq: Number(info[2]),
sendDate: new Date(info[3]),
sentMessage: info[4],
receiverCount: info[5]
receiverCount: Number(info[5])
});
}
}

View File

@ -11,7 +11,9 @@
<img *ngIf="" src="" class="avatar" />
<div class="bubble">
<div class="message">{{ message.sentMessage }}</div>
<div class="message">
{{ message.sentMessage }}
</div>
<div class="time secondary-text">
{{ message.sendDate | date: 'short' }}
</div>

View File

@ -2,6 +2,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { Info } from '@ucap-webmessenger/protocol-event';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { NGXLogger } from 'ngx-logger';
@Component({
selector: 'ucap-chat-messages',
@ -14,7 +15,9 @@ export class MessagesComponent implements OnInit {
@Input()
messages: Info[];
constructor() {}
constructor(private logger: NGXLogger) {}
ngOnInit() {}
ngOnInit() {
this.logger.debug('type of userSeq', typeof this.loginRes.userSeq);
}
}