From a2fdfca19d087251bb3dec0d1a2bb98d90ca70ac Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 11 Oct 2022 14:53:48 +0100 Subject: [PATCH] improve --- src/app/modals/profile/profile.page.ts | 2 +- .../shared/chat/new-group/new-group.page.ts | 5 ++- src/app/shared/header/header.page.ts | 33 +++++++------------ 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index 6c3692569..696837ffd 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -235,7 +235,7 @@ export class ProfilePage implements OnInit { this.isProfileOpen = true; const modal = await this.modalController.create({ - component: ProfilePage, + component: EditProfilePage, cssClass: 'model profile-modal search-submodal', componentProps: { } diff --git a/src/app/shared/chat/new-group/new-group.page.ts b/src/app/shared/chat/new-group/new-group.page.ts index 4df61c4b2..61aed9ccf 100644 --- a/src/app/shared/chat/new-group/new-group.page.ts +++ b/src/app/shared/chat/new-group/new-group.page.ts @@ -69,16 +69,15 @@ export class NewGroupPage implements OnInit{ this.showDuration = event.detail.checked; - if(event.detail.checked){ + if(event.detail.checked) { this.thedate = new Date(); } - else{ + else { this.thedate = ''; } } close() { - // this.addGroupMessage.emit(); if(this.link) { this.RouteService.goBack(); this.dataService.set("link", false); diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 9920c63cf..f8b585684 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -34,7 +34,7 @@ export class HeaderPage implements OnInit { production = environment.production environment = environment - isProfileOpen = false + canOpenSearch = false constructor( private router: Router, @@ -51,7 +51,6 @@ export class HeaderPage implements OnInit { this.loggeduser = SessionStore.user; router.events.subscribe((val) => { this.showSearch = false; - this.isProfileOpen = false this.canOpenSearch = true; }); @@ -110,7 +109,6 @@ export class HeaderPage implements OnInit { } } - canOpenSearch = true async openSearch() { let classs, showSearchInput, type; @@ -122,8 +120,6 @@ export class HeaderPage implements OnInit { showSearchInput = false } - - if (window.location.pathname.startsWith('/home/agenda')) { type = "Agenda" } else if (window.location.pathname.startsWith('/home/gabinete-digital')) { @@ -188,24 +184,17 @@ export class HeaderPage implements OnInit { } - if(this.isProfileOpen == false) { + const modal = await this.modalController.create({ + component: ProfilePage, + cssClass: 'model profile-modal search-submodal', + componentProps: { + } + }); + await modal.present(); - this.isProfileOpen = true; - - const modal = await this.modalController.create({ - component: ProfilePage, - cssClass: 'model profile-modal search-submodal', - componentProps: { - } - }); - await modal.present(); - - modal.onDidDismiss().then(() => { - this.isProfileOpen = false; - this.notificationLengthData() - }) - - } + modal.onDidDismiss().then(() => { + this.notificationLengthData() + }) }