mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -16,7 +16,7 @@ import { MessagesPage } from './messages/messages.page';
|
||||
import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
import { Subject } from "rxjs/Rx";
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { NavigationStart, Router, NavigationEnd } from '@angular/router';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -142,30 +142,29 @@ export class ChatPage implements OnInit {
|
||||
this.hideRefreshButton();
|
||||
this.getChatMembers();
|
||||
|
||||
let t = this.showDateDuration(new Date());
|
||||
|
||||
this.checkCreateGroup();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
|
||||
if (event instanceof NavigationEnd && event.url == '/home/chat' ||
|
||||
event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") {
|
||||
this.checkCreateGroup();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
checkCreateGroup() {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = true;
|
||||
}
|
||||
|
||||
/* this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart || event.url.endsWith('/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> {
|
||||
@@ -174,7 +173,6 @@ export class ChatPage implements OnInit {
|
||||
|
||||
ngOnDestroy() {
|
||||
this.setStatus('offline');
|
||||
this.dataService.set("newGroup", false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user