This commit is contained in:
Peter Maquiran
2022-04-18 15:12:27 +01:00
parent 8c704ca898
commit 7de80902cf
14 changed files with 41 additions and 24 deletions
@@ -7,6 +7,7 @@ import { ChatService } from 'src/app/services/chat.service';
import { NewGroupPage } from '../../new-group/new-group.page';
import { GroupMessagesPage } from '../group-messages.page';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-group-contacts',
@@ -31,7 +32,8 @@ export class GroupContactsPage implements OnInit {
isGroupCreated:boolean;
groupName:string;
selectedUserList:any;
sessionStore = SessionStore
constructor(
private modalController: ModalController,
private http: HttpClient,
@@ -68,7 +70,7 @@ export class GroupContactsPage implements OnInit {
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
}
else{
this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.RochetChatUser);
}
this.users = this.contacts.sort((a,b) => {
if(a.name < b.name){