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,9 +1,9 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController, PickerController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-edit-group',
@@ -27,10 +27,9 @@ export class EditGroupPage implements OnInit {
private modalController: ModalController,
private pickerController: PickerController,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
}
ngOnInit() {
@@ -1,8 +1,7 @@
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController } from '@ionic/angular';
import * as _ from 'lodash';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { NewGroupPage } from '../../new-group/new-group.page';
import { GroupMessagesPage } from '../group-messages.page';
@@ -22,7 +21,6 @@ export class GroupContactsPage implements OnInit {
contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
headers: HttpHeaders;
options:any;
listContacts: any[];
contacts: any;
@@ -40,14 +38,12 @@ export class GroupContactsPage implements OnInit {
constructor(
private modalController: ModalController,
private http: HttpClient,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public ChatSystemService: ChatSystemService
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
this.room=null;
@@ -144,10 +140,8 @@ export class GroupContactsPage implements OnInit {
this.showLoader = false;
}
loadUsers1(members:any){
this.options = {
headers: this.headers,
};
loadUsers1(members:any) {
this.chatService.getAllUsers().subscribe((res:any)=>{
@@ -175,9 +169,7 @@ export class GroupContactsPage implements OnInit {
}
loadUsers(){
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
@@ -273,24 +265,6 @@ export class GroupContactsPage implements OnInit {
});
}
/* createGroup(){
if(!this.isGroupCreated){
let body = { "name":this.groupName, }
this.chatService.addGroup(body).subscribe(res=>{
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
});
}
else{
this.addContacts(this.room);
this.close();
}
} */
async newGroup(){
this.close();
@@ -1,19 +1,16 @@
import { Component, OnChanges, OnInit, Input, SimpleChanges, ChangeDetectorRef, Output, EventEmitter, ViewChild, ElementRef, AfterViewInit, OnDestroy, ComponentFactoryResolver } from '@angular/core';
import { Component, OnChanges, OnInit, Input, SimpleChanges, Output, EventEmitter, ViewChild, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
import { AnimationController, ModalController, PopoverController, Platform } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
// import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatPopoverPage } from 'src/app/shared/popover/chat-popover/chat-popover.page';
import { GroupContactsPage } from './group-contacts/group-contacts.page';
import { Router } from '@angular/router'
import { ChatOptionsPopoverPage } from '../../popover/chat-options-popover/chat-options-popover.page';
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
import { TimeService } from 'src/app/services/functions/time.service';
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
// import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchList } from 'src/app/models/search-document';
import { ProcessesService } from 'src/app/services/processes.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
@@ -21,7 +18,6 @@ import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { CameraService } from 'src/app/services/camera.service';
import { FileType } from 'src/app/models/fileType';
@@ -30,22 +26,12 @@ import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-recorder';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { DomSanitizer } from '@angular/platform-browser';
import { AlertController } from '@ionic/angular';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
/*
import * as pdfjsLib from 'pdfjs-dist';
if( pdfjsLib !== undefined ){
pdfjsLib.GlobalWorkerOptions.workerSrc = "https://npmcdn.com/pdfjs-dist@2.4.456/build/pdf.worker.js";
}
*/
@Component({
selector: 'app-group-messages',
templateUrl: './group-messages.page.html',
@@ -110,24 +96,17 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
private modalController: ModalController,
public popoverController: PopoverController,
private chatService: ChatService,
private authService: AuthService,
//private authService: AuthService,
private animationController: AnimationController,
private alertService: AlertService,
private route: Router,
private timeService: TimeService,
private fileLoaderService: FileLoaderService,
private fileToBase64Service: FileToBase64Service,
private processesService: ProcessesService,
// private fileToBase64Service: FileToBase64Service,
private fileService: FileService,
public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
private storage: Storage,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private toastService: ToastService,
private sanitiser: DomSanitizer,
private alertController: AlertController,
private file: File,
private platform: Platform,
private fileOpener: FileOpener,
@@ -136,7 +115,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = true;
this.roomCountDownDate = "";
this.roomCountDownTime = "";
@@ -1,7 +1,6 @@
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
@@ -31,11 +30,10 @@ export class ContactsPage implements OnInit {
constructor(
private modalController: ModalController,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public ChatSystemService: ChatSystemService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
this.room=null;
@@ -108,7 +108,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private modalController: ModalController,
/* private navParams: NavParams, */
private chatService: ChatService,
private authService: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
private timeService: TimeService,
@@ -118,7 +117,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private storage: Storage,
public ChatSystemService: ChatSystemService,
public RochetChatConnectorService: RochetChatConnectorService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private sanitiser: DomSanitizer,
private file: File,
@@ -1,6 +1,5 @@
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
import { ModalController, PickerController, PopoverController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { DataService } from 'src/app/services/data.service';
@@ -10,6 +9,7 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service';
import { RouteService } from 'src/app/services/route.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-new-group',
templateUrl: './new-group.page.html',
@@ -49,7 +49,7 @@ export class NewGroupPage implements OnInit{
private RouteService: RouteService,
)
{
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = false;
}