mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/viewer-attachment' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/viewer-attachment
This commit is contained in:
@@ -183,6 +183,7 @@ export class AuthService {
|
||||
setTimeout(() => {
|
||||
|
||||
if (SessionStore.user.ChatData?.data) {
|
||||
this.RochetChatConnectorService.logout();
|
||||
this.RochetChatConnectorService.connect();
|
||||
this.RochetChatConnectorService.login().then((message: any) => {
|
||||
console.log('Chat login', message)
|
||||
|
||||
@@ -157,7 +157,7 @@ export class ChatSystemService {
|
||||
|
||||
runMainChangeDetector() {
|
||||
console.log("change")
|
||||
this.mainChangeDetector()
|
||||
// this.mainChangeDetector()
|
||||
}
|
||||
|
||||
loadChat() {
|
||||
|
||||
@@ -448,6 +448,8 @@ export class MessageService {
|
||||
let downloadFile = "";
|
||||
this.AttachmentsService.downloadFile(this.file.guid).subscribe(async (event) => {
|
||||
|
||||
console.log('download file',event)
|
||||
|
||||
if (event.type === HttpEventType.DownloadProgress) {
|
||||
|
||||
} else if (event.type === HttpEventType.Response) {
|
||||
@@ -456,6 +458,7 @@ export class MessageService {
|
||||
} else if (this.file.type != "application/img") {
|
||||
|
||||
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
|
||||
console.log('downloaded file', downloadFile)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ export class RoomService {
|
||||
this.name = ChatMessage.msg
|
||||
}
|
||||
|
||||
this.changeDetector()
|
||||
// this.changeDetector()
|
||||
setTimeout(() => {
|
||||
done()
|
||||
}, 5)
|
||||
|
||||
@@ -263,5 +263,17 @@ export class FileService {
|
||||
return new File([u8arr], filename, {type:mime});
|
||||
}
|
||||
|
||||
base64toBlobIos(base64Data, contentType) {
|
||||
contentType = contentType || '';
|
||||
const byteCharacters = atob(base64Data);
|
||||
const byteArray = new Uint8Array(byteCharacters.length);
|
||||
|
||||
for (let i = 0; i < byteCharacters.length; i++) {
|
||||
byteArray[i] = byteCharacters.charCodeAt(i);
|
||||
}
|
||||
|
||||
return new Blob([byteArray], { type: contentType });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user