mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -29,6 +29,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { TimeService } from 'src/app/services/functions/time.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -115,7 +116,9 @@ export class ChatPage implements OnInit {
|
||||
private resolver: ComponentFactoryResolver,
|
||||
private route: Router,
|
||||
private timeService: TimeService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private dataService:DataService,
|
||||
private router: Router,
|
||||
){
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
@@ -150,6 +153,21 @@ export class ChatPage implements OnInit {
|
||||
console.log(t);
|
||||
|
||||
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 (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
|
||||
alert('OIII')
|
||||
} else {
|
||||
if(this.dataService.get("newGroup")){
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(){
|
||||
@@ -397,7 +415,7 @@ hideRefreshButton(){
|
||||
//console.log('TIMER');
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Contactos" && this.showMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getDirectMessages();
|
||||
//console.log('Timer contactos list running')
|
||||
}
|
||||
@@ -453,7 +471,7 @@ hideRefreshButton(){
|
||||
else {
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Grupos" && this.showGroupMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getGroups();
|
||||
//console.log('Timer groups list running')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user