mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
continue work on opening chat from expediente
This commit is contained in:
@@ -7,7 +7,9 @@ import {
|
||||
ComponentFactoryResolver,
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
Output
|
||||
Output,
|
||||
AfterViewChecked,
|
||||
AfterViewInit
|
||||
} from '@angular/core';
|
||||
import { ModalController, Platform } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -17,7 +19,6 @@ import { ContactsPage } from './messages/contacts/contacts.page';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
import * as Rx from "rxjs/Rx";
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
@@ -39,7 +40,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
templateUrl: './chat.page.html',
|
||||
styleUrls: ['./chat.page.scss'],
|
||||
})
|
||||
export class ChatPage implements OnInit {
|
||||
export class ChatPage implements OnInit, AfterViewInit {
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -136,6 +137,7 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.loggedUserChat);
|
||||
|
||||
this.segment = "Contactos";
|
||||
@@ -162,17 +164,38 @@ export class ChatPage implements OnInit {
|
||||
this.openNewGroupPage();
|
||||
} */
|
||||
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
|
||||
//alert('OIII')
|
||||
} else {
|
||||
alert('Aqui' + this.dataService.get("newGroup"))
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
/* if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
|
||||
alert(this.dataService.get("newGroup"))
|
||||
}
|
||||
else {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
}
|
||||
} */
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", false);
|
||||
}
|
||||
});
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
alert(this.dataService.get("newGroup"))
|
||||
}
|
||||
|
||||
ngAfterViewChecked(){
|
||||
//alert(this.dataService.get("newGroup"))
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user