update fix

This commit is contained in:
Peter Maquiran
2023-08-21 11:42:34 +01:00
parent fdce8db602
commit a89b2739c8
9 changed files with 53 additions and 31 deletions
@@ -202,21 +202,27 @@ export class GroupContactsPage implements OnInit {
if(!foundUser) {
this.objectUserSingleStone.push(user)
} else {
console.log('not found')
}
}
const userContainer = {}
for(const user of this.objectUserSingleStone) {
const firstLetter = user.name.charAt(0)
if(!this.userContainer[firstLetter]) {
this.userContainer[firstLetter] = [user]
if(!userContainer[firstLetter]) {
userContainer[firstLetter] = [user]
} else {
this.userContainer[firstLetter].push(user)
userContainer[firstLetter].push(user)
}
}
this.userContainer = userContainer
this.showLoader = false;
});
}
+12 -11
View File
@@ -135,17 +135,18 @@ export class NewGroupPage implements OnInit{
if(res?.result?.rid) {
this.addGroupMessage.emit(res.result.rid);
await this.ChatSystemService.getAllRooms();
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) {
this.createGroupWithAttachmentsCath(res)
} else {
setTimeout(()=> {
this.createGroupWithAttachments(res)
}, 500)
}
this.ChatSystemService.getAllRooms(() => {
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) {
this.createGroupWithAttachmentsCath(res)
} else {
setTimeout(()=> {
this.createGroupWithAttachments(res)
}, 500)
}
}, res.result.rid);