mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Take out all special characters in string
This commit is contained in:
@@ -8,8 +8,6 @@ import {
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
Output,
|
||||
AfterViewChecked,
|
||||
AfterViewInit
|
||||
} from '@angular/core';
|
||||
import { ModalController, Platform } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -40,7 +38,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
templateUrl: './chat.page.html',
|
||||
styleUrls: ['./chat.page.scss'],
|
||||
})
|
||||
export class ChatPage implements OnInit, AfterViewInit {
|
||||
export class ChatPage implements OnInit {
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -164,42 +162,25 @@ export class ChatPage implements OnInit, AfterViewInit {
|
||||
this.openNewGroupPage();
|
||||
} */
|
||||
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
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{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = true;
|
||||
}
|
||||
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() {
|
||||
this.setStatus('offline');
|
||||
this.dataService.set("newGroup", false);
|
||||
console.log('On Destroy')
|
||||
}
|
||||
|
||||
@@ -513,6 +494,13 @@ export class ChatPage implements OnInit, AfterViewInit {
|
||||
console.log('Chat list', res);
|
||||
|
||||
if (res != 200) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.userDirectMessages = res.ims.sort((a, b) => {
|
||||
var dateA = new Date(a._updatedAt).getTime();
|
||||
var dateB = new Date(b._updatedAt).getTime();
|
||||
return dateB - dateA;
|
||||
});
|
||||
}
|
||||
//console.log(res.ims);
|
||||
/* this.userDirectMessages = res.ims.sort((a, b) => {
|
||||
var dateA = new Date(a._updatedAt).getTime();
|
||||
@@ -557,9 +545,10 @@ export class ChatPage implements OnInit, AfterViewInit {
|
||||
this.chatService.getAllUsers().subscribe(res => {
|
||||
console.log('chatusers', res);
|
||||
this.transformDataUserList(res['users'])
|
||||
|
||||
//this.dmUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||
//console.log(this.dmUsers);
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.dmUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||
console.log(this.dmUsers);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user