remove uunsed

This commit is contained in:
Peter Maquiran
2024-10-21 10:15:48 +01:00
parent 661b449fb4
commit ac1f01b15b
40 changed files with 21 additions and 744 deletions
@@ -2,7 +2,6 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, HostListener, Input
import { AnimationController, GestureController, IonRange, ModalController, PopoverController } from '@ionic/angular';
import { ToastService } from 'src/app/services/toast.service';
import { ContactsPage } from '../contacts/contacts.page';
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service';
import { FileType } from 'src/app/models/fileType';
@@ -35,7 +34,6 @@ import { ChatPopoverPage } from '../../modal/chat-popover/chat-popover.page';
import { LastMessage } from '../../utils/lastMessage';
import { UserTypingLocalRepository } from 'src/app/module/chat/data/repository/typing/user-typing-local-data-source.service';
import { UserTypingRemoteRepositoryService } from 'src/app/module/chat/data/repository/typing/user-typing-live-data-source.service';
import { MessageLocalDataSourceService } from 'src/app/module/chat/data/repository/message/message-local-data-source.service';
import { RoomType } from "src/app/core/chat/entity/group";
import { Logger } from 'src/app/services/logger/main/service';
import { tap } from 'rxjs/operators';
@@ -44,8 +42,6 @@ import { ViewOncesImagePage, ViewOncesImagePageInput } from '../../modal/view-on
import { MemberTable } from 'src/app/infra/database/dexie/instance/chat/schema/members';
import { MessageTable } from 'src/app/infra/database/dexie/instance/chat/schema/message';
import { RoomTable } from 'src/app/infra/database/dexie/instance/chat/schema/room';
import { TypingTable } from 'src/app/infra/database/dexie/instance/chat/schema/typing';
import { HttpClient } from '@angular/common/http';
import { RoomViewModel } from '../../store/model/room';
import { MessageViewModal } from '../../store/model/message';
import { XBallon } from '../../utils/messageBallon';
@@ -176,9 +172,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private RoomLocalRepository: RoomLocalRepository,
private userTypingLocalRepository: UserTypingLocalRepository,
private UserTypingRemoteRepositoryService: UserTypingRemoteRepositoryService,
private messageLocalDataSourceService: MessageLocalDataSourceService,
private alertController: AlertController,
private http: HttpClient
) {
// update
this.checkAudioPermission()
@@ -1308,83 +1302,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async _openChatOptions() {
const roomId = this.room.$id;
const enterAnimation = (baseEl: any) => {
const backdropAnimation = this.animationController.create()
.addElement(baseEl.querySelector('ion-backdrop')!)
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
const wrapperAnimation = this.animationController.create()
.addElement(baseEl.querySelector('.modal-wrapper')!)
.keyframes([
{ offset: 0, opacity: '1', right: '-100%' },
{ offset: 1, opacity: '1', right: '0px' }
]);
return this.animationController.create()
.addElement(baseEl)
.easing('ease-out')
.duration(500)
.addAnimation([backdropAnimation, wrapperAnimation]);
}
const leaveAnimation = (baseEl: any) => {
return enterAnimation(baseEl).direction('reverse');
}
const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: ChatOptionsFeaturesPage,
cssClass: 'model profile-modal search-submodal',
componentProps: {
roomId: this.room.$id,
members: [],
}
});
modal.onDidDismiss().then(async (res) => {
if (res['data'] == 'meeting') {
//this.closeAllDesktopComponents.emit();
let data = {
roomId: this.room.$id,
members: []
}
this.openNewEventPage.emit(data);
}
else if (res['data'] == 'take-picture') {
this.takePictureMobile()
}
else if (res['data'] == 'add-picture') {
this.pickPicture()
}
else if (res['data'] == 'add-document') {
this.addFile()
}
else if (res['data'] == 'documentoGestaoDocumental') {
this.addFileWebtrix()
this.showLoader = false;
}
});
await modal.present();
}
async audioPreview(msg) {
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {