mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add user list
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
import { ModalController, Platform } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ChatService as ChatServiceGPR} from 'src/app/services/chat/chat.service'
|
||||
import { GroupMessagesPage } from './group-messages/group-messages.page';
|
||||
import { ContactsPage } from './messages/contacts/contacts.page';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
@@ -123,9 +124,11 @@ export class ChatPage implements OnInit {
|
||||
private router: Router,
|
||||
private sqlservice: SqliteService,
|
||||
private platform: Platform,
|
||||
private storageservice: StorageService
|
||||
private storageservice: StorageService,
|
||||
public ChatServiceGPR: ChatServiceGPR
|
||||
|
||||
) {
|
||||
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
window.onresize = (event) => {
|
||||
@@ -142,44 +145,44 @@ export class ChatPage implements OnInit {
|
||||
|
||||
this.segment = "Contactos";
|
||||
|
||||
this.authService.userData$.subscribe((res: any) => {
|
||||
this.loggedUser = res;
|
||||
console.log(this.loggedUser);
|
||||
this.load();
|
||||
// this.authService.userData$.subscribe((res: any) => {
|
||||
// this.loggedUser = res;
|
||||
// console.log(this.loggedUser);
|
||||
// this.load();
|
||||
|
||||
this.getDirectMessagesDB();
|
||||
});
|
||||
// // this.getDirectMessagesDB();
|
||||
// });
|
||||
|
||||
/* websocket functions */
|
||||
//this.sendMsg();
|
||||
|
||||
/* Fim websocket functions */
|
||||
this.hideRefreshButton();
|
||||
this.getChatMembers();
|
||||
// this.hideRefreshButton();
|
||||
// this.getChatMembers();
|
||||
|
||||
//Teste
|
||||
let t = this.showDateDuration(new Date());
|
||||
console.log(t);
|
||||
// let t = this.showDateDuration(new Date());
|
||||
// console.log(t);
|
||||
|
||||
this.setStatus('away');
|
||||
// this.setStatus('away');
|
||||
/* if(this.dataService.get("newGroup")){
|
||||
this.openNewGroupPage();
|
||||
} */
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", false);
|
||||
}
|
||||
});
|
||||
// this.router.events.forEach((event) => {
|
||||
// if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
// if (this.dataService.get("newGroup")) {
|
||||
// this.openNewGroupPage();
|
||||
// }
|
||||
// else{
|
||||
// this.closeAllDesktopComponents();
|
||||
// this.showEmptyComponent = true;
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// this.dataService.set("newGroup", false);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
numSequence(n: number): Array<number> {
|
||||
|
||||
Reference in New Issue
Block a user