mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add attachmen to mobile
This commit is contained in:
@@ -69,6 +69,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="attachment.fileType == 2">
|
||||
<img [src]="attachment.safeFile">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -167,7 +167,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
|
||||
|
||||
|
||||
this.roomData$ = this.roomRepositoryService.getItemByIdLive(this.roomId)
|
||||
this.getMessages();
|
||||
this.listenToIncomingMessage();
|
||||
@@ -198,7 +198,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
// dont remove this line
|
||||
this.messages1[this.roomId] = []
|
||||
let messages = await this.messageRepositoryService.getItems(this.roomId)
|
||||
|
||||
|
||||
this.messages1[this.roomId] = []
|
||||
this.messages1[this.roomId] = messages
|
||||
this.loadAttachment()
|
||||
@@ -247,7 +247,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.messageReceiveSubject?.unsubscribe();
|
||||
this.messageReceiveSubject = this.chatServiceService.listenToIncomingMessage(this.roomId).subscribe(async (message) => {
|
||||
this.messages1[this.roomId].push(message as MessageEntity)
|
||||
|
||||
|
||||
if(message.hasAttachment) {
|
||||
|
||||
const result = await this.chatServiceService.getMessageAttachmentByMessageId({
|
||||
@@ -578,7 +578,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
message.attachments = [{
|
||||
file: encodedData,
|
||||
file: encodedData.split(',')[1],
|
||||
fileName: "audio",
|
||||
source: MessageAttachmentSource.Device,
|
||||
fileType: MessageAttachmentFileType.Audio,
|
||||
|
||||
Reference in New Issue
Block a user