update create event from document

This commit is contained in:
Peter Maquiran
2023-08-20 22:00:23 +01:00
parent f6c911fc32
commit fdce8db602
6 changed files with 48 additions and 29 deletions
@@ -7,6 +7,12 @@ import { ThemeService } from 'src/app/services/theme.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { SessionStore } from 'src/app/store/session.service';
class UserToSelect {
}
@Component({
selector: 'app-contacts',
templateUrl: './contacts.page.html',
@@ -29,9 +35,10 @@ export class ContactsPage implements OnInit {
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
userList = this.ChatSystemService.users
CoolList = []
constructor(
private modalController: ModalController,
private chatService: ChatService,
@@ -57,6 +64,21 @@ export class ContactsPage implements OnInit {
const username = e.name.toLowerCase()
return username.includes(this.textSearch)
})
const alfa = {}
for (let user of this.userList) {
let firstCharacter = user.name.charAt(0);
if(!alfa[firstCharacter]) {
alfa[firstCharacter] = [user]
} else {
alfa[firstCharacter].push(user)
}
}
}