mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
remove promise bug
This commit is contained in:
@@ -98,7 +98,12 @@ export class ChatOptionsFeaturesPage implements OnInit {
|
||||
const file = this.fileLoaderService.getFirstFile(input)
|
||||
|
||||
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
let imageData;
|
||||
try {
|
||||
imageData = await this.fileToBase64Service.convert(file)
|
||||
} catch (error) {
|
||||
console.error('load picture chat',error)
|
||||
}
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = file.name;
|
||||
|
||||
|
||||
@@ -116,6 +116,8 @@ export class ProfilePage implements OnInit {
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
}).catch((error) => {
|
||||
console.error('storage getnotification: ',error)
|
||||
})
|
||||
/* await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getNotificationData(); */
|
||||
@@ -193,7 +195,9 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
this.storageservice.store("Notifications", JSON.stringify(this.notificationdata)).then(() => {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('storage delete notification: ',error)
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,12 @@ export class SetRoomOwnerPage implements OnInit {
|
||||
|
||||
async setRoomOwner(user:any){
|
||||
|
||||
let res:any = await this.ChatSystemService.addRoomOwner(this.roomId, user._id);
|
||||
let res:any;
|
||||
try {
|
||||
res = await this.ChatSystemService.addRoomOwner(this.roomId, user._id)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
|
||||
if(res.error){
|
||||
|
||||
Reference in New Issue
Block a user