mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve
This commit is contained in:
@@ -59,6 +59,7 @@ export class MessageService {
|
||||
downloadLoader: boolean = false
|
||||
downloadAttachments = false;
|
||||
downloadAttachmentsTemp = 0;
|
||||
UploadAttachmentsTemp = 0;
|
||||
|
||||
constructor(private storage: Storage,
|
||||
private NfService: NfService,
|
||||
@@ -150,11 +151,13 @@ export class MessageService {
|
||||
let uploadSuccessfully = false
|
||||
if(this.hasSendAttachment == false) {
|
||||
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
|
||||
this.UploadAttachmentsTemp++
|
||||
}
|
||||
|
||||
this.uploadingFile = false
|
||||
|
||||
if(uploadSuccessfully) {
|
||||
|
||||
this.hasSendAttachment = true
|
||||
this.errorUploadingAttachment = false
|
||||
this.temporaryData = {}
|
||||
@@ -163,6 +166,7 @@ export class MessageService {
|
||||
await this.sendRequest(params)
|
||||
|
||||
} else if(this.WsChatService.isLogin == false) {
|
||||
|
||||
this.WsChatService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: async ()=> {
|
||||
@@ -171,7 +175,11 @@ export class MessageService {
|
||||
}
|
||||
})
|
||||
|
||||
} else if(uploadSuccessfully == false) {
|
||||
} else if(uploadSuccessfully == false && this.UploadAttachmentsTemp == 1) {
|
||||
this.send()
|
||||
}
|
||||
else if(uploadSuccessfully == false) {
|
||||
|
||||
this.errorUploadingAttachment = true
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user