mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
remove promise bug
This commit is contained in:
@@ -403,10 +403,14 @@ export class ChatPage implements OnInit {
|
||||
//
|
||||
|
||||
//
|
||||
}).catch((error) => {
|
||||
console.error('storage getdirectmessagedb: ',error)
|
||||
})
|
||||
|
||||
this.storageservice.get('chatusers').then((users) => {
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.UserName);
|
||||
}).catch((error) => {
|
||||
console.error('storage getchatusers: ',error)
|
||||
})
|
||||
} else {
|
||||
this.sqlservice.getAllChatRoom().then((rooms: any) => {
|
||||
@@ -557,10 +561,14 @@ export class ChatPage implements OnInit {
|
||||
|
||||
|
||||
//
|
||||
}).catch((error) => {
|
||||
console.error('storage getGrup Romm db: ',error)
|
||||
})
|
||||
|
||||
this.storageservice.get('chatusers').then((users) => {
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.UserName);
|
||||
}).catch((error) => {
|
||||
console.error('storage getgrupDb: ',error)
|
||||
})
|
||||
} else {
|
||||
this.sqlservice.getAllChatRoom().then((rooms: any) => {
|
||||
@@ -662,7 +670,9 @@ export class ChatPage implements OnInit {
|
||||
else {
|
||||
//Check if modal is opened
|
||||
if (this.segment == "Grupos" && this.showGroupMessages != true) {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await new Promise(resolve => setTimeout(resolve, 1000)).catch ((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
//await this.getGroups();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user