remove unused imports

This commit is contained in:
Peter Maquiran
2022-10-12 17:01:09 +01:00
parent de16765d97
commit 959bb53b82
59 changed files with 116 additions and 277 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ export class ChatPage implements OnInit {
public ChatSystemService: ChatSystemService,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.headers = new HttpHeaders();
window.onresize = (event) => {
if (window.innerWidth > 701) {
@@ -16,7 +16,6 @@ import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
})
export class GroupContactsPage implements OnInit {
showLoader: boolean;
loggedUser: any;
users = [];
contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
@@ -44,7 +43,6 @@ export class GroupContactsPage implements OnInit {
public ChatSystemService: ChatSystemService,
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch="";
this.dm=null;
@@ -90,7 +90,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController,
private chatService: ChatService,
private navParams: NavParams,
private authService: AuthService,
private alertService: AlertService,
private route: Router,
private timeService: TimeService,
@@ -107,7 +106,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private file: File,
private fileOpener: FileOpener,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = true;
this.roomId = this.navParams.get('roomId');
window.onresize = (event) => {
@@ -33,7 +33,7 @@ export class ContactsPage implements OnInit {
public ChatSystemService: ChatSystemService,
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
+1 -12
View File
@@ -111,34 +111,23 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
private chatService: ChatService,
private authService: AuthService,
private alertService: AlertService,
private toastService: ToastService,
private route: Router,
private activatedRoute: ActivatedRoute,
private fileService: FileService,
private gestureController: GestureController,
private processes: ProcessesService,
public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform,
private sqlservice: SqliteService,
public ChatSystemService: ChatSystemService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private processesService: ProcessesService,
private storage: Storage,
private fileToBase64Service: FileToBase64Service,
private sant: DomSanitizer,
//private fileOpener: FileOpener,
private sanitiser: DomSanitizer,
private alertController: AlertController,
// private document: DocumentViewer
private file: File,
private fileOpener: FileOpener,
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId');
@@ -56,15 +56,7 @@ export class ContactsPage implements OnInit {
private http: HttpClient,
public ThemeService: ThemeService
)
{
this.headers = new HttpHeaders();
this.headers = this.headers.set('Access-Control-Allow-Origin' , '*');
this.headers = this.headers.set('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT');
this.headers = this.headers.set('Accept','application/json');
this.headers = this.headers.set('content-type','application/json');
}
{ }
ngOnInit() {
this.loadUsers();
@@ -72,23 +64,7 @@ export class ContactsPage implements OnInit {
}
loadUsers(){
this.options = {
headers: this.headers,
};
/* this.http.get('https://randomuser.me/api/?results=100', this.options)
.subscribe(res => {
this.users = res['results'].sort((a,b) => {
if(a.name.first < b.name.first){
return -1;
}
if(a.name.first > b.name.first){
return 1;
}
return 0;
});
}); */
this.users = this.contacts.sort((a,b) => {
if(a.first < b.first){
return -1;
@@ -101,17 +77,7 @@ export class ContactsPage implements OnInit {
}
separateLetter(record, recordIndex, records){
/* if(recordIndex == 0){
return record.name.first[0];
}
let first_prev = records[recordIndex - 1].name.first[0];
let first_current = record.name.first[0];
if(first_prev != first_current){
return first_current;
}
return null; */
if(recordIndex == 0){
return record.first[0];
}
@@ -31,12 +31,9 @@ export class NewGroupPage implements OnInit {
private modalController: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService,
private chatService: ChatService,
private processesService: ProcessesService,
public ChatSystemService: ChatSystemService,
private authService: AuthService,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = false;
this.groupName = this.navParams.get('name');
this.documents = this.navParams.get('documents');