Files
doneit-web/src/app/shared/chat/new-group/contacts/contacts.page.ts
T

74 lines
1.4 KiB
TypeScript
Raw Normal View History

2021-03-04 18:50:26 +01:00
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { GroupMessagesPage } from '../../group-messages/group-messages.page';
2021-10-25 13:21:48 +01:00
import { ThemeService } from 'src/app/services/theme.service'
2022-10-04 11:33:46 +01:00
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
2021-03-04 18:50:26 +01:00
@Component({
selector: 'app-contacts',
templateUrl: './contacts.page.html',
styleUrls: ['./contacts.page.scss'],
})
export class ContactsPage implements OnInit {
options:any;
constructor(
private modalController: ModalController,
2022-10-04 11:33:46 +01:00
public ThemeService: ThemeService,
public ChatSystemService: ChatSystemService
2021-03-04 18:50:26 +01:00
)
{
2022-10-04 11:33:46 +01:00
2021-03-04 18:50:26 +01:00
}
ngOnInit() {
this.loadUsers();
}
loadUsers(){
2022-10-04 11:33:46 +01:00
this.ChatSystemService.getUser()
2021-03-04 18:50:26 +01:00
}
separateLetter(record, recordIndex, records){
if(recordIndex == 0){
return record.first[0];
}
let first_prev = records[recordIndex - 1].first[0];
let first_current = record.first[0];
if(first_prev != first_current){
return first_current;
}
return null;
}
doRefresh(event){
}
close(){
this.modalController.dismiss();
}
onChange(event){
}
clicked(){
2022-04-28 09:32:27 +01:00
2021-03-04 18:50:26 +01:00
}
async groupMessages(){
const modal = await this.modalController.create({
component: GroupMessagesPage,
componentProps: {},
cssClass: 'contacts',
backdropDismiss: false
});
modal.onDidDismiss();
2023-07-15 11:01:09 +01:00
await modal.present();
2021-03-04 18:50:26 +01:00
}
}